blob: e7c8e4f667d05f72e84d9c5a06d4a679772a8b3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
trait True {}
struct Is<const V: bool>;
impl True for Is<true> {}
fn g<T>()
//~^ NOTE required by a bound in this
where
Is<{ std::mem::size_of::<T>() == 0 }>: True,
//~^ NOTE required by a bound in `g`
//~| NOTE required by this bound in `g`
{
}
fn main() {
g::<usize>();
//~^ ERROR mismatched types
//~| NOTE expected `false`, found `true`
//~| NOTE expected constant `false`
}
|