blob: 70dfaf724c9bdf5ee8d6a9d5c9a5b473447fa415 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//@ compile-flags: -Znext-solver
//@ edition:2021
#![feature(const_trait_impl, const_closures)]
#![allow(incomplete_features)]
#[const_trait]
trait Bar {
fn foo(&self);
}
impl Bar for () {
fn foo(&self) {}
}
const FOO: () = {
(const || ().foo())();
//~^ ERROR the trait bound `(): [const] Bar` is not satisfied
// FIXME(const_trait_impl): The constness environment for const closures is wrong.
};
fn main() {}
|