summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs
blob: 6598d1da0f866b58af76f6f1e83368608e208a49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![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
}