Closed
Description
Given the following code:
impl Self {}
The current output is:
error[E0391]: cycle detected when computing type of `<impl at src/main.rs:1:1: 1:13>`
--> src/main.rs:1:6
|
1 | impl Self {}
| ^^^^
|
= note: ...which immediately requires computing type of `<impl at src/main.rs:1:1: 1:13>` again
note: cycle used when collecting item types in top-level module
--> src/main.rs:1:1
|
1 | impl Self {}
| ^^^^^^^^^
For more information about this error, try `rustc --explain E0391`.
Ideally the output should look like:
Something more like
error[E0412]: cannot find type `Self` in this scope
--> src/main.rs:1:6
|
1 | impl Self {}
| ^^^^ not found in this scope
Or even a better message explaining that there should be an actual type there instead of just "Self" ..?