fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: `self` parameter is only allowed in associated functions 2 --> $DIR/nested-item.rs:5:9 3 | 4LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { 5 | ^^^^ not semantically valid as function parameter 6 | 7 = note: associated functions are those in `impl` or `trait` definitions 8 9error: `self` parameter is only allowed in associated functions 10 --> $DIR/nested-item.rs:5:29 11 | 12LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { 13 | ^^^^^ not semantically valid as function parameter 14 | 15 = note: associated functions are those in `impl` or `trait` definitions 16 17error[E0106]: missing lifetime specifier 18 --> $DIR/nested-item.rs:5:46 19 | 20LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { 21 | ^ expected named lifetime parameter 22 | 23 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 24help: consider using the `'static` lifetime 25 | 26LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &'static () { 27 | +++++++ 28 29error[E0412]: cannot find type `Wrap` in this scope 30 --> $DIR/nested-item.rs:5:15 31 | 32LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { 33 | ^^^^ not found in this scope 34 35error: aborting due to 4 previous errors 36 37Some errors have detailed explanations: E0106, E0412. 38For more information about an error, try `rustc --explain E0106`.