blob: f77f691c19276825020bdf8fdc373e21d46ce13a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// reduced from rustc issue-69020-assoc-const-arith-overflow.rs
pub fn main() {}
pub trait Foo {
const OOB: i32;
}
impl<T: Foo> Foo for Vec<T> {
const OOB: i32 = [1][1] + T::OOB;
//~^ ERROR: operation will panic
}
|