rust/src/test/ui/resolve/issue-33876.rs
2018-12-25 21:08:33 -07:00

13 lines
196 B
Rust

use std::any::Any;
struct Foo;
trait Bar {}
impl Bar for Foo {}
fn main() {
let any: &Any = &Bar; //~ ERROR expected value, found trait `Bar`
if any.is::<u32>() { println!("u32"); }
}