]>
Commit | Line | Data |
---|---|---|
923072b8 FG |
1 | error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions |
2 | --> $DIR/issue-24968.rs:21:19 | |
3 | | | |
4 | LL | const FOO2: u32 = Self::bar(); | |
5 | | ^^^^ `Self` is only available in impls, traits, and type definitions | |
6 | ||
7 | error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions | |
8 | --> $DIR/issue-24968.rs:27:22 | |
9 | | | |
10 | LL | static FOO_S2: u32 = Self::bar(); | |
11 | | ^^^^ `Self` is only available in impls, traits, and type definitions | |
12 | ||
32a655c1 | 13 | error[E0411]: cannot find type `Self` in this scope |
923072b8 | 14 | --> $DIR/issue-24968.rs:3:11 |
32a655c1 | 15 | | |
0531ce1d | 16 | LL | fn foo(_: Self) { |
923072b8 FG |
17 | | --- ^^^^ `Self` is only available in impls, traits, and type definitions |
18 | | | | |
19 | | `Self` not allowed in a function | |
20 | ||
21 | error[E0411]: cannot find type `Self` in this scope | |
22 | --> $DIR/issue-24968.rs:8:12 | |
23 | | | |
24 | LL | fn foo2() { | |
25 | | ---- `Self` not allowed in a function | |
26 | LL | let x: Self; | |
27 | | ^^^^ `Self` is only available in impls, traits, and type definitions | |
28 | ||
29 | error[E0411]: cannot find type `Self` in this scope | |
30 | --> $DIR/issue-24968.rs:14:5 | |
31 | | | |
32 | LL | type Foo<T> | |
33 | | --- `Self` not allowed in a type alias | |
34 | LL | where | |
35 | LL | Self: Clone, | |
36 | | ^^^^ `Self` is only available in impls, traits, and type definitions | |
37 | ||
38 | error[E0411]: cannot find type `Self` in this scope | |
39 | --> $DIR/issue-24968.rs:18:12 | |
40 | | | |
41 | LL | const FOO: Self = 0; | |
42 | | --- ^^^^ `Self` is only available in impls, traits, and type definitions | |
43 | | | | |
44 | | `Self` not allowed in a constant item | |
45 | ||
46 | error[E0411]: cannot find type `Self` in this scope | |
47 | --> $DIR/issue-24968.rs:24:15 | |
48 | | | |
49 | LL | static FOO_S: Self = 0; | |
50 | | ----- ^^^^ `Self` is only available in impls, traits, and type definitions | |
51 | | | | |
52 | | `Self` not allowed in a static item | |
32a655c1 | 53 | |
923072b8 | 54 | error: aborting due to 7 previous errors |
32a655c1 | 55 | |
923072b8 FG |
56 | Some errors have detailed explanations: E0411, E0433. |
57 | For more information about an error, try `rustc --explain E0411`. |