1 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
2 --> $DIR/issue-24968.rs:21:19
4 LL | const FOO2: u32 = Self::bar();
5 | ^^^^ `Self` is only available in impls, traits, and type definitions
7 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
8 --> $DIR/issue-24968.rs:27:22
10 LL | static FOO_S2: u32 = Self::bar();
11 | ^^^^ `Self` is only available in impls, traits, and type definitions
13 error[E0411]: cannot find type `Self` in this scope
14 --> $DIR/issue-24968.rs:3:11
16 LL | fn foo(_: Self) {
17 | --- ^^^^ `Self` is only available in impls, traits, and type definitions
19 | `Self` not allowed in a function
21 error[E0411]: cannot find type `Self` in this scope
22 --> $DIR/issue-24968.rs:8:12
25 | ---- `Self` not allowed in a function
27 | ^^^^ `Self` is only available in impls, traits, and type definitions
29 error[E0411]: cannot find type `Self` in this scope
30 --> $DIR/issue-24968.rs:14:5
33 | --- `Self` not allowed in a type alias
36 | ^^^^ `Self` is only available in impls, traits, and type definitions
38 error[E0411]: cannot find type `Self` in this scope
39 --> $DIR/issue-24968.rs:18:12
41 LL | const FOO: Self = 0;
42 | --- ^^^^ `Self` is only available in impls, traits, and type definitions
44 | `Self` not allowed in a constant item
46 error[E0411]: cannot find type `Self` in this scope
47 --> $DIR/issue-24968.rs:24:15
49 LL | static FOO_S: Self = 0;
50 | ----- ^^^^ `Self` is only available in impls, traits, and type definitions
52 | `Self` not allowed in a static item
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`.