summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-33876.rs
blob: e233ec631cc13d7e57f8296a63978fbe6c389bc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std::any::Any;

struct Foo;

trait Bar {}

impl Bar for Foo {}

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