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:
kennytm 2018-12-03 18:07:07 +08:00 committed by GitHub
commit bf96a7bbed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 25 additions and 82 deletions

View file

@ -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`

View file

@ -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`.