384f7382ba
Fixes #113381 r? fee1-dead
16 lines
251 B
Rust
16 lines
251 B
Rust
#![feature(const_closures, const_trait_impl, effects)]
|
|
#![allow(incomplete_features)]
|
|
|
|
trait Foo {
|
|
fn foo(&self);
|
|
}
|
|
|
|
impl Foo for () {
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
fn main() {
|
|
(const || { (()).foo() })();
|
|
//~^ ERROR: cannot call non-const fn
|
|
}
|