My favorite way:
let () = s;
error[E0308]: mismatched types
--> <anon>:5:9
|
5 | let () = s;
| ^^ expected reference, found ()
|
= note: expected type `&&std::string::String`
= note: found type `()`
My favorite way:
let () = s;
error[E0308]: mismatched types
--> <anon>:5:9
|
5 | let () = s;
| ^^ expected reference, found ()
|
= note: expected type `&&std::string::String`
= note: found type `()`