blob: 50dd66da6dbb4505ef24919e204ad8ff24330980 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// check-pass
// known-bug: unknown
// This should not compile, as the compiler should not know
// `A - 0` is satisfied `?x - 0` if `?x` is inferred to `A`.
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
pub struct Ref<'a>(&'a i32);
impl<'a> Ref<'a> {
pub fn foo<const A: usize>() -> [(); A - 0] {
Self::foo()
}
}
fn main() {}
|