]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/issue-24968.stderr
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / resolve / issue-24968.stderr
1 error[E0411]: cannot find type `Self` in this scope
2   --> $DIR/issue-24968.rs:3:11
3    |
4 LL | fn foo(_: Self) {
5    |    ---    ^^^^ `Self` is only available in impls, traits, and type definitions
6    |    |
7    |    `Self` not allowed in a function
8
9 error[E0411]: cannot find type `Self` in this scope
10   --> $DIR/issue-24968.rs:8:12
11    |
12 LL | fn foo2() {
13    |    ---- `Self` not allowed in a function
14 LL |     let x: Self;
15    |            ^^^^ `Self` is only available in impls, traits, and type definitions
16
17 error[E0411]: cannot find type `Self` in this scope
18   --> $DIR/issue-24968.rs:14:5
19    |
20 LL | type Foo<T>
21    |      --- `Self` not allowed in a type alias
22 LL | where
23 LL |     Self: Clone,
24    |     ^^^^ `Self` is only available in impls, traits, and type definitions
25
26 error[E0411]: cannot find type `Self` in this scope
27   --> $DIR/issue-24968.rs:18:12
28    |
29 LL | const FOO: Self = 0;
30    |       ---  ^^^^ `Self` is only available in impls, traits, and type definitions
31    |       |
32    |       `Self` not allowed in a constant item
33
34 error[E0411]: cannot find type `Self` in this scope
35   --> $DIR/issue-24968.rs:24:15
36    |
37 LL | static FOO_S: Self = 0;
38    |        -----  ^^^^ `Self` is only available in impls, traits, and type definitions
39    |        |
40    |        `Self` not allowed in a static item
41
42 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
43   --> $DIR/issue-24968.rs:21:19
44    |
45 LL | const FOO2: u32 = Self::bar();
46    |                   ^^^^ `Self` is only available in impls, traits, and type definitions
47
48 error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
49   --> $DIR/issue-24968.rs:27:22
50    |
51 LL | static FOO_S2: u32 = Self::bar();
52    |                      ^^^^ `Self` is only available in impls, traits, and type definitions
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`.