b17e6680d6
Fixes #109543. When checking paths in HIR typeck, we don't want to check for const predicates since all we want might just be a function pointer. Therefore we move this to MIR constck and check that bounds are met during MIR constck.
16 lines
207 B
Rust
16 lines
207 B
Rust
// check-pass
|
|
#![feature(const_trait_impl)]
|
|
|
|
#[const_trait]
|
|
pub trait Test {}
|
|
|
|
impl Test for () {}
|
|
|
|
pub const fn test<T: ~const Test>() {}
|
|
|
|
pub const fn min_by_i32() -> fn() {
|
|
test::<()>
|
|
}
|
|
|
|
fn main() {}
|