summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-96169.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/issue-96169.rs')
-rw-r--r--tests/ui/consts/issue-96169.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-96169.rs b/tests/ui/consts/issue-96169.rs
new file mode 100644
index 000000000..14c0a1399
--- /dev/null
+++ b/tests/ui/consts/issue-96169.rs
@@ -0,0 +1,18 @@
+// check-pass
+// compile-flags: -Zmir-opt-level=4 --emit=mir
+#![allow(unused)]
+fn a() -> usize { 0 }
+
+fn bar(_: u32) {}
+
+fn baz() -> *const dyn Fn(u32) { unimplemented!() }
+
+fn foo() {
+ match () {
+ _ if baz() == &bar as &dyn Fn(u32) => (),
+ () => (),
+ }
+}
+
+fn main() {
+}