mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
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.
11 lines
228 B
Rust
11 lines
228 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(inline_const_pat)]
|
|
|
|
fn main() {
|
|
match () {
|
|
const { (|| {})() } => {}
|
|
//~^ ERROR cannot call non-const closure in constants
|
|
//~| ERROR the trait bound
|
|
}
|
|
}
|