]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-err-late.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / const-err-late.rs
CommitLineData
2b03887a
FG
1// build-fail
2// compile-flags: -C overflow-checks=on
3
4#![allow(arithmetic_overflow, unconditional_panic)]
5
6fn black_box<T>(_: T) {
7 unimplemented!()
8}
9
10struct S<T>(T);
11
12impl<T> S<T> {
13 const FOO: u8 = [5u8][1];
14 //~^ ERROR evaluation of `S::<i32>::FOO` failed
15 //~| ERROR evaluation of `S::<u32>::FOO` failed
16}
17
18fn main() {
487cf647 19 black_box((S::<i32>::FOO, S::<u32>::FOO)); //~ constant
2b03887a 20}