blob: af40ad94d1c0ba74eb44f35120fc97c082cad465 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//@ check-pass
//@ compile-flags: -Znext-solver
#![feature(const_trait_impl)]
const fn impls_fn<F: [const] Fn(u32) -> Foo>(_: &F) {}
struct Foo(u32);
const fn foo() {
// This previously triggered an incorrect assert
// when checking whether the constructor of `Foo`
// is const.
impls_fn(&Foo)
}
fn main() {}
|