Closed
Description
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=53b02445623677643befa3e7dbe0f3b4
fn foo<Self>() {}
The current output is:
error: expected identifier, found keyword `Self`
--> src/lib.rs:1:8
|
1 | fn foo<Self>() {}
| ^^^^ expected identifier, found keyword
The diagnostic itself is right but confusing; it lacks why Self
is a reserved keyword (IIUC it's because Self
is special-cased to represent traits or ADTs in its implementations).