fork/rust

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

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

master
1.2 KiB34 linesraw
1error: `self` parameter is only allowed in associated functions
2  --> $DIR/issue-102989.rs:7:15
3   |
4LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
5   |               ^^^^ not semantically valid as function parameter
6   |
7   = note: associated functions are those in `impl` or `trait` definitions
8
9error[E0412]: cannot find type `Struct` in this scope
10  --> $DIR/issue-102989.rs:7:22
11   |
12LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
13   |                      ^^^^^^ not found in this scope
14
15error[E0425]: cannot find value `x` in this scope
16  --> $DIR/issue-102989.rs:10:13
17   |
18LL |     let x = x << 1;
19   |             ^ help: a local variable with a similar name exists: `f`
20
21error[E0152]: found duplicate lang item `sized`
22  --> $DIR/issue-102989.rs:5:1
23   |
24LL | trait Sized { }
25   | ^^^^^^^^^^^
26   |
27   = note: the lang item is first defined in crate `core` (which `std` depends on)
28   = note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
29   = note: second definition in the local crate (`issue_102989`)
30
31error: aborting due to 4 previous errors
32
33Some errors have detailed explanations: E0152, E0412, E0425.
34For more information about an error, try `rustc --explain E0152`.