rust/tests/ui/resolve/issue-33876.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
200 B
Rust
Raw Normal View History

2016-05-26 08:29:17 -05:00
use std::any::Any;
struct Foo;
trait Bar {}
impl Bar for Foo {}
fn main() {
2019-05-28 13:46:13 -05:00
let any: &dyn Any = &Bar; //~ ERROR expected value, found trait `Bar`
2016-05-26 08:29:17 -05:00
if any.is::<u32>() { println!("u32"); }
}