rust/tests/ui/traits/issue-102989.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1.2 KiB
Plaintext
Raw Normal View History

error: `self` parameter is only allowed in associated functions
2022-10-14 17:45:11 +00:00
--> $DIR/issue-102989.rs:7:15
|
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 17:45:11 +00:00
--> $DIR/issue-102989.rs:7:22
|
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| ^^^^^^ not found in this scope
error[E0425]: cannot find value `x` in this scope
--> $DIR/issue-102989.rs:10:13
|
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 17:45:11 +00:00
--> $DIR/issue-102989.rs:5:1
|
LL | trait Sized { }
| ^^^^^^^^^^^
|
2022-10-14 17:45:11 +00:00
= note: the lang item is first defined in crate `core` (which `std` depends on)
2022-10-13 06:07:39 +00:00
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
= note: second definition in the local crate (`issue_102989`)
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0152, E0412, E0425.
For more information about an error, try `rustc --explain E0152`.