diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/const-generics/ice-118285-fn-ptr-value.rs | 5 |
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() {} |