about summary refs log tree commit diff
path: root/tests/ui/resolve/issue-33876.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/resolve/issue-33876.rs')
-rw-r--r--tests/ui/resolve/issue-33876.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-33876.rs b/tests/ui/resolve/issue-33876.rs
new file mode 100644
index 00000000000..e233ec631cc
--- /dev/null
+++ b/tests/ui/resolve/issue-33876.rs
@@ -0,0 +1,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"); }
+}