mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-25 12:57:11 +00:00
19 lines
353 B
Rust
19 lines
353 B
Rust
//@ check-pass
|
|
// FIXME(effects) this shouldn't pass
|
|
//@ compile-flags: -Znext-solver
|
|
#![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() })();
|
|
// FIXME(effects) ~^ ERROR: cannot call non-const fn
|
|
}
|