2025-08-21 15:45:40 +02:00
|
|
|
//@ check-pass
|
|
|
|
|
//@ compile-flags: -Znext-solver
|
|
|
|
|
#![feature(const_trait_impl)]
|
2025-08-31 22:26:10 -04:00
|
|
|
const fn impls_fn<F: [const] Fn(u32) -> Foo>(_: &F) {}
|
2025-08-21 15:45:40 +02:00
|
|
|
|
|
|
|
|
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() {}
|