2022-10-12 23:07:56 -05:00
|
|
|
error: `self` parameter is only allowed in associated functions
|
2022-10-14 12:45:11 -05:00
|
|
|
--> $DIR/issue-102989.rs:7:15
|
2022-10-12 23:07:56 -05:00
|
|
|
|
|
|
|
|
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
|
|
|
|
| ^^^^ not semantically valid as function parameter
|
|
|
|
|
|
|
|
|
= note: associated functions are those in `impl` or `trait` definitions
|
|
|
|
|
|
|
|
error[E0412]: cannot find type `Struct` in this scope
|
2022-10-14 12:45:11 -05:00
|
|
|
--> $DIR/issue-102989.rs:7:22
|
2022-10-12 23:07:56 -05:00
|
|
|
|
|
|
|
|
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
|
|
|
|
| ^^^^^^ not found in this scope
|
|
|
|
|
|
|
|
error[E0425]: cannot find value `x` in this scope
|
2022-11-06 10:28:07 -06:00
|
|
|
--> $DIR/issue-102989.rs:10:13
|
2022-10-12 23:07:56 -05:00
|
|
|
|
|
|
|
|
LL | let x = x << 1;
|
|
|
|
| ^ help: a local variable with a similar name exists: `f`
|
|
|
|
|
|
|
|
error[E0152]: found duplicate lang item `sized`
|
2022-10-14 12:45:11 -05:00
|
|
|
--> $DIR/issue-102989.rs:5:1
|
2022-10-12 23:07:56 -05:00
|
|
|
|
|
|
|
|
LL | trait Sized { }
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2022-10-14 12:45:11 -05:00
|
|
|
= note: the lang item is first defined in crate `core` (which `std` depends on)
|
2022-10-13 01:07:39 -05:00
|
|
|
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
|
2022-10-12 23:07:56 -05:00
|
|
|
= note: second definition in the local crate (`issue_102989`)
|
|
|
|
|
2022-11-06 10:28:07 -06:00
|
|
|
error: aborting due to 4 previous errors
|
2022-10-12 23:07:56 -05:00
|
|
|
|
2022-11-06 10:28:07 -06:00
|
|
|
Some errors have detailed explanations: E0152, E0412, E0425.
|
2022-10-12 23:07:56 -05:00
|
|
|
For more information about an error, try `rustc --explain E0152`.
|