]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/issue-24968.stderr
Rollup merge of #101166 - GuillaumeGomez:error-index-mdbook, r=notriddle
[rust.git] / src / test / ui / resolve / issue-24968.stderr
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
13 error[E0411]: cannot find type `Self` in this scope
14   --> $DIR/issue-24968.rs:3:11
15    |
16 LL | fn foo(_: Self) {
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
53
54 error: aborting due to 7 previous errors
55
56 Some errors have detailed explanations: E0411, E0433.
57 For more information about an error, try `rustc --explain E0411`.