Rollup merge of #56366 - alexreg:stabilise-self_in_typedefs, r=Centril
Stabilize self_in_typedefs feature [**Tracking Issue**](https://github.com/rust-lang/rust/issues/49303) r? @centril
This commit is contained in:
commit
bf96a7bbed
11 changed files with 25 additions and 82 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
struct Foo<Self>(Self);
|
||||
//~^ ERROR expected identifier, found keyword `Self`
|
||||
//~^^ ERROR E0392
|
||||
|
||||
trait Bar<Self> {}
|
||||
//~^ ERROR expected identifier, found keyword `Self`
|
||||
|
|
|
|||
|
|
@ -5,10 +5,19 @@ LL | struct Foo<Self>(Self);
|
|||
| ^^^^ expected identifier, found keyword
|
||||
|
||||
error: expected identifier, found keyword `Self`
|
||||
--> $DIR/issue-36638.rs:16:11
|
||||
--> $DIR/issue-36638.rs:17:11
|
||||
|
|
||||
LL | trait Bar<Self> {}
|
||||
| ^^^^ expected identifier, found keyword
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0392]: parameter `Self` is never used
|
||||
--> $DIR/issue-36638.rs:13:12
|
||||
|
|
||||
LL | struct Foo<Self>(Self);
|
||||
| ^^^^ unused type parameter
|
||||
|
|
||||
= help: consider removing `Self` or using a marker such as `std::marker::PhantomData`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0392`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue