]> git.lizzy.rs Git - rust.git/blob - tests/ui/lifetimes/fullwidth-ampersand.stderr
add tests for 107090
[rust.git] / tests / ui / lifetimes / fullwidth-ampersand.stderr
1 error: unknown start of token: \u{ff06}
2   --> $DIR/fullwidth-ampersand.rs:3:10
3    |
4 LL | fn f(_: &&()) -> &() { todo!() }
5    |          ^^
6    |
7 help: Unicode character '&' (Fullwidth Ampersand) looks like '&' (Ampersand), but it is not
8    |
9 LL | fn f(_: &&()) -> &() { todo!() }
10    |          ~
11
12 error[E0106]: missing lifetime specifier
13   --> $DIR/fullwidth-ampersand.rs:3:18
14    |
15 LL | fn f(_: &&()) -> &() { todo!() }
16    |         -----     ^ expected named lifetime parameter
17    |
18    = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
19 help: consider introducing a named lifetime parameter
20    |
21 LL | fn f<'a>(_: &'a &'a ()) -> &'a () { todo!() }
22    |     ++++     ++   ++         ++
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0106`.