blob: 414b80ca0daab58b32ec779ca3399f50da4b71ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Make sure we don't issue *two* error messages for the trait predicate *and* host predicate.
#![feature(const_trait_impl)]
#[const_trait]
trait Trait {
type Out;
}
const fn needs_const<T: [const] Trait>(_: &T) {}
const IN_CONST: () = {
needs_const(&());
//~^ ERROR the trait bound `(): Trait` is not satisfied
};
const fn conditionally_const() {
needs_const(&());
//~^ ERROR the trait bound `(): Trait` is not satisfied
}
fn main() {}
|