7 expect::<Option<()>>(x);
8 //~^ ERROR mismatched types
9 //~| HELP use `Option::copied` to copy the value inside the `Option`
11 expect::<Result<(), ()>>(x);
12 //~^ ERROR mismatched types
13 //~| HELP use `Result::copied` to copy the value inside the `Result`
14 let s = String::new();
16 expect::<Option<String>>(x);
17 //~^ ERROR mismatched types
18 //~| HELP use `Option::cloned` to clone the value inside the `Option`
20 expect::<Result<String, ()>>(x);
21 //~^ ERROR mismatched types
22 //~| HELP use `Result::cloned` to clone the value inside the `Result`