2023-12-18 22:28:21 -06:00
|
|
|
// check-pass
|
|
|
|
// FIXME(effects) this shouldn't pass
|
2023-10-25 16:19:34 -05:00
|
|
|
#![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() })();
|
2023-12-18 22:28:21 -06:00
|
|
|
// FIXME(effects) ~^ ERROR: cannot call non-const fn
|
2023-10-25 16:19:34 -05:00
|
|
|
}
|