2022-07-27 02:27:52 -05:00
|
|
|
// check-pass
|
2023-01-11 13:42:27 -06:00
|
|
|
// known-bug: unknown
|
2022-07-27 02:27:52 -05:00
|
|
|
|
|
|
|
// This should not compile, as the compiler should not know
|
|
|
|
// `A - 0` is satisfied `?x - 0` if `?x` is inferred to `A`.
|
2021-08-19 13:13:57 -05:00
|
|
|
#![allow(incomplete_features)]
|
2021-08-27 11:04:57 -05:00
|
|
|
#![feature(generic_const_exprs)]
|
2021-08-19 13:13:57 -05:00
|
|
|
|
|
|
|
pub struct Ref<'a>(&'a i32);
|
|
|
|
|
|
|
|
impl<'a> Ref<'a> {
|
|
|
|
pub fn foo<const A: usize>() -> [(); A - 0] {
|
|
|
|
Self::foo()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|