Updated ui tests.

This commit is contained in:
Alexander Regueiro 2018-11-30 15:41:32 +00:00
parent 7bc1255955
commit d609fdf775
5 changed files with 15 additions and 5 deletions

View File

@ -2,7 +2,7 @@ error[E0411]: cannot find type `Self` in this scope
--> $DIR/E0411.rs:12:6
|
LL | <Self>::foo; //~ ERROR E0411
| ^^^^ `Self` is only available in traits and impls
| ^^^^ `Self` is only available in impls, traits, and type definitions
error: aborting due to previous error

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

View File

@ -2,7 +2,7 @@ error[E0411]: cannot find type `Self` in this scope
--> $DIR/issue-24968.rs:11:11
|
LL | fn foo(_: Self) {
| ^^^^ `Self` is only available in traits and impls
| ^^^^ `Self` is only available in impls, traits, and type definitions
error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0411]: expected trait, found self type `Self`
--> $DIR/resolve-self-in-impl-2.rs:14:6
|
LL | impl Self for S {} //~ ERROR expected trait, found self type `Self`
| ^^^^ `Self` is only available in traits and impls
| ^^^^ `Self` is only available in impls, traits, and type definitions
error[E0405]: cannot find trait `N` in `Self`
--> $DIR/resolve-self-in-impl-2.rs:15:12