Skip to content

Commit d609fdf

Browse files
committed
Updated ui tests.
1 parent 7bc1255 commit d609fdf

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

src/test/ui/error-codes/E0411.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0411]: cannot find type `Self` in this scope
22
--> $DIR/E0411.rs:12:6
33
|
44
LL | <Self>::foo; //~ ERROR E0411
5-
| ^^^^ `Self` is only available in traits and impls
5+
| ^^^^ `Self` is only available in impls, traits, and type definitions
66

77
error: aborting due to previous error
88

src/test/ui/issues/issue-36638.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
struct Foo<Self>(Self);
1414
//~^ ERROR expected identifier, found keyword `Self`
15+
//~^^ ERROR E0392
1516

1617
trait Bar<Self> {}
1718
//~^ ERROR expected identifier, found keyword `Self`

src/test/ui/issues/issue-36638.stderr

+11-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ LL | struct Foo<Self>(Self);
55
| ^^^^ expected identifier, found keyword
66

77
error: expected identifier, found keyword `Self`
8-
--> $DIR/issue-36638.rs:16:11
8+
--> $DIR/issue-36638.rs:17:11
99
|
1010
LL | trait Bar<Self> {}
1111
| ^^^^ expected identifier, found keyword
1212

13-
error: aborting due to 2 previous errors
13+
error[E0392]: parameter `Self` is never used
14+
--> $DIR/issue-36638.rs:13:12
15+
|
16+
LL | struct Foo<Self>(Self);
17+
| ^^^^ unused type parameter
18+
|
19+
= help: consider removing `Self` or using a marker such as `std::marker::PhantomData`
20+
21+
error: aborting due to 3 previous errors
1422

23+
For more information about this error, try `rustc --explain E0392`.

src/test/ui/resolve/issue-24968.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0411]: cannot find type `Self` in this scope
22
--> $DIR/issue-24968.rs:11:11
33
|
44
LL | fn foo(_: Self) {
5-
| ^^^^ `Self` is only available in traits and impls
5+
| ^^^^ `Self` is only available in impls, traits, and type definitions
66

77
error: aborting due to previous error
88

src/test/ui/resolve/resolve-self-in-impl-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0411]: expected trait, found self type `Self`
22
--> $DIR/resolve-self-in-impl-2.rs:14:6
33
|
44
LL | impl Self for S {} //~ ERROR expected trait, found self type `Self`
5-
| ^^^^ `Self` is only available in traits and impls
5+
| ^^^^ `Self` is only available in impls, traits, and type definitions
66

77
error[E0405]: cannot find trait `N` in `Self`
88
--> $DIR/resolve-self-in-impl-2.rs:15:12

0 commit comments

Comments
 (0)