fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.0 KiB57 linesraw
1error[E0411]: cannot find type `Self` in this scope
2  --> $DIR/issue-24968.rs:3:11
3   |
4LL | fn foo(_: Self) {
5   |    ---    ^^^^ `Self` is only available in impls, traits, and type definitions
6   |    |
7   |    `Self` not allowed in a function
8
9error[E0411]: cannot find type `Self` in this scope
10  --> $DIR/issue-24968.rs:8:12
11   |
12LL | fn foo2() {
13   |    ---- `Self` not allowed in a function
14LL |     let x: Self;
15   |            ^^^^ `Self` is only available in impls, traits, and type definitions
16
17error[E0411]: cannot find type `Self` in this scope
18  --> $DIR/issue-24968.rs:14:5
19   |
20LL | type Foo<T>
21   |      --- `Self` not allowed in a type alias
22LL | where
23LL |     Self: Clone,
24   |     ^^^^ `Self` is only available in impls, traits, and type definitions
25
26error[E0411]: cannot find type `Self` in this scope
27  --> $DIR/issue-24968.rs:18:12
28   |
29LL | 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
34error[E0411]: cannot find type `Self` in this scope
35  --> $DIR/issue-24968.rs:24:15
36   |
37LL | 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
42error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
43  --> $DIR/issue-24968.rs:21:19
44   |
45LL | const FOO2: u32 = Self::bar();
46   |                   ^^^^ `Self` is only available in impls, traits, and type definitions
47
48error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
49  --> $DIR/issue-24968.rs:27:22
50   |
51LL | static FOO_S2: u32 = Self::bar();
52   |                      ^^^^ `Self` is only available in impls, traits, and type definitions
53
54error: aborting due to 7 previous errors
55
56Some errors have detailed explanations: E0411, E0433.
57For more information about an error, try `rustc --explain E0411`.