1 error: `self` parameter is only allowed in associated functions
2 --> $DIR/issue-102989.rs:7:15
4 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
5 | ^^^^ not semantically valid as function parameter
7 = note: associated functions are those in `impl` or `trait` definitions
9 error[E0412]: cannot find type `Struct` in this scope
10 --> $DIR/issue-102989.rs:7:22
12 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
13 | ^^^^^^ not found in this scope
15 error[E0425]: cannot find value `x` in this scope
16 --> $DIR/issue-102989.rs:11:13
19 | ^ help: a local variable with a similar name exists: `f`
21 error[E0152]: found duplicate lang item `sized`
22 --> $DIR/issue-102989.rs:5:1
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`)
31 error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
32 --> $DIR/issue-102989.rs:11:15
35 | ^^ doesn't have a size known at compile-time
37 = help: the trait `std::marker::Sized` is not implemented for `{integer}`
39 error[E0308]: mismatched types
40 --> $DIR/issue-102989.rs:7:42
42 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
43 | ---------- ^^^^ expected `&u32`, found `()`
45 | implicitly returns `()` as its body has no tail or `return` expression
47 note: consider returning one of these bindings
48 --> $DIR/issue-102989.rs:7:30
50 LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
56 error: aborting due to 6 previous errors
58 Some errors have detailed explanations: E0152, E0277, E0308, E0412, E0425.
59 For more information about an error, try `rustc --explain E0152`.