2017-01-11 16:18:08 -06:00
|
|
|
error[E0411]: cannot find type `Self` in this scope
|
2022-06-19 21:24:28 -05:00
|
|
|
--> $DIR/issue-24968.rs:3:11
|
2016-11-30 16:35:25 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn foo(_: Self) {
|
2022-06-19 21:24:28 -05:00
|
|
|
| --- ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
| |
|
|
|
|
| `Self` not allowed in a function
|
|
|
|
|
|
|
|
error[E0411]: cannot find type `Self` in this scope
|
|
|
|
--> $DIR/issue-24968.rs:8:12
|
|
|
|
|
|
|
|
|
LL | fn foo2() {
|
|
|
|
| ---- `Self` not allowed in a function
|
|
|
|
LL | let x: Self;
|
|
|
|
| ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
|
|
|
|
error[E0411]: cannot find type `Self` in this scope
|
|
|
|
--> $DIR/issue-24968.rs:14:5
|
|
|
|
|
|
|
|
|
LL | type Foo<T>
|
|
|
|
| --- `Self` not allowed in a type alias
|
|
|
|
LL | where
|
|
|
|
LL | Self: Clone,
|
|
|
|
| ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
|
|
|
|
error[E0411]: cannot find type `Self` in this scope
|
|
|
|
--> $DIR/issue-24968.rs:18:12
|
|
|
|
|
|
|
|
|
LL | const FOO: Self = 0;
|
|
|
|
| --- ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
| |
|
|
|
|
| `Self` not allowed in a constant item
|
|
|
|
|
|
|
|
error[E0411]: cannot find type `Self` in this scope
|
|
|
|
--> $DIR/issue-24968.rs:24:15
|
|
|
|
|
|
|
|
|
LL | static FOO_S: Self = 0;
|
|
|
|
| ----- ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
| |
|
|
|
|
| `Self` not allowed in a static item
|
2016-11-30 16:35:25 -06:00
|
|
|
|
2022-09-18 02:35:21 -05:00
|
|
|
error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
|
|
|
|
--> $DIR/issue-24968.rs:21:19
|
|
|
|
|
|
|
|
|
LL | const FOO2: u32 = Self::bar();
|
|
|
|
| ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
|
|
|
|
error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
|
|
|
|
--> $DIR/issue-24968.rs:27:22
|
|
|
|
|
|
|
|
|
LL | static FOO_S2: u32 = Self::bar();
|
|
|
|
| ^^^^ `Self` is only available in impls, traits, and type definitions
|
|
|
|
|
2022-06-19 21:24:28 -05:00
|
|
|
error: aborting due to 7 previous errors
|
2016-11-30 16:35:25 -06:00
|
|
|
|
2022-06-19 21:24:28 -05:00
|
|
|
Some errors have detailed explanations: E0411, E0433.
|
|
|
|
For more information about an error, try `rustc --explain E0411`.
|