summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/ice-118285-fn-ptr-value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/ice-118285-fn-ptr-value.rs')
-rw-r--r--tests/ui/const-generics/ice-118285-fn-ptr-value.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/const-generics/ice-118285-fn-ptr-value.rs b/tests/ui/const-generics/ice-118285-fn-ptr-value.rs
new file mode 100644
index 000000000..b68afb0bc
--- /dev/null
+++ b/tests/ui/const-generics/ice-118285-fn-ptr-value.rs
@@ -0,0 +1,5 @@
+struct Checked<const F: fn(usize) -> bool>;
+//~^ ERROR function pointers as const generic parameters is forbidden
+fn not_one(val: usize) -> bool { val != 1 }
+const _: Checked<not_one> = Checked::<not_one>;
+fn main() {}