]> git.proxmox.com Git - rustc.git/blame - src/test/ui/resolve/issue-24968.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / resolve / issue-24968.stderr
CommitLineData
923072b8
FG
1error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
2 --> $DIR/issue-24968.rs:21:19
3 |
4LL | const FOO2: u32 = Self::bar();
5 | ^^^^ `Self` is only available in impls, traits, and type definitions
6
7error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
8 --> $DIR/issue-24968.rs:27:22
9 |
10LL | static FOO_S2: u32 = Self::bar();
11 | ^^^^ `Self` is only available in impls, traits, and type definitions
12
32a655c1 13error[E0411]: cannot find type `Self` in this scope
923072b8 14 --> $DIR/issue-24968.rs:3:11
32a655c1 15 |
0531ce1d 16LL | 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
21error[E0411]: cannot find type `Self` in this scope
22 --> $DIR/issue-24968.rs:8:12
23 |
24LL | fn foo2() {
25 | ---- `Self` not allowed in a function
26LL | let x: Self;
27 | ^^^^ `Self` is only available in impls, traits, and type definitions
28
29error[E0411]: cannot find type `Self` in this scope
30 --> $DIR/issue-24968.rs:14:5
31 |
32LL | type Foo<T>
33 | --- `Self` not allowed in a type alias
34LL | where
35LL | Self: Clone,
36 | ^^^^ `Self` is only available in impls, traits, and type definitions
37
38error[E0411]: cannot find type `Self` in this scope
39 --> $DIR/issue-24968.rs:18:12
40 |
41LL | 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
46error[E0411]: cannot find type `Self` in this scope
47 --> $DIR/issue-24968.rs:24:15
48 |
49LL | 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 54error: aborting due to 7 previous errors
32a655c1 55
923072b8
FG
56Some errors have detailed explanations: E0411, E0433.
57For more information about an error, try `rustc --explain E0411`.