8 fn deref(&self) -> &Self::Target {
14 let _ = "foo" as bool;
15 //~^ ERROR casting `&'static str` as `bool` is invalid [E0606]
17 let _ = String::from("foo") as bool;
18 //~^ ERROR non-primitive cast: `String` as `bool` [E0605]
21 //~^ ERROR non-primitive cast: `Foo` as `bool` [E0605]
24 fn _slice(bar: &[i32]) -> bool {
26 //~^ ERROR casting `&[i32]` as `bool` is invalid [E0606]