Skip to content

Commit

Permalink
Updated ui tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreg committed Nov 30, 2018
1 parent 7bc1255 commit d609fdf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/error-codes/E0411.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/ui/issues/issue-36638.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
13 changes: 11 additions & 2 deletions src/test/ui/issues/issue-36638.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion src/test/ui/resolve/issue-24968.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/resolve/resolve-self-in-impl-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d609fdf

Please sign in to comment.