1 error[E0411]: cannot find type `Self` in this scope
2 --> $DIR/issue-24968.rs:3:11
5 | --- ^^^^ `Self` is only available in impls, traits, and type definitions
7 | `Self` not allowed in a function
9 error[E0411]: cannot find type `Self` in this scope
10 --> $DIR/issue-24968.rs:8:12
13 | ---- `Self` not allowed in a function
15 | ^^^^ `Self` is only available in impls, traits, and type definitions
17 error[E0411]: cannot find type `Self` in this scope
18 --> $DIR/issue-24968.rs:14:5
21 | --- `Self` not allowed in a type alias
24 | ^^^^ `Self` is only available in impls, traits, and type definitions
26 error[E0411]: cannot find type `Self` in this scope
27 --> $DIR/issue-24968.rs:18:12
29 LL | const FOO: Self = 0;
30 | --- ^^^^ `Self` is only available in impls, traits, and type definitions
32 | `Self` not allowed in a constant item
34 error[E0411]: cannot find type `Self` in this scope
35 --> $DIR/issue-24968.rs:24:15
37 LL | static FOO_S: Self = 0;
38 | ----- ^^^^ `Self` is only available in impls, traits, and type definitions
40 | `Self` not allowed in a static item
42 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
43 --> $DIR/issue-24968.rs:21:19
45 LL | const FOO2: u32 = Self::bar();
46 | ^^^^ `Self` is only available in impls, traits, and type definitions
48 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
49 --> $DIR/issue-24968.rs:27:22
51 LL | static FOO_S2: u32 = Self::bar();
52 | ^^^^ `Self` is only available in impls, traits, and type definitions
54 error: aborting due to 7 previous errors
56 Some errors have detailed explanations: E0411, E0433.
57 For more information about an error, try `rustc --explain E0411`.