]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/const-eval-overflow-2.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / const-eval / const-eval-overflow-2.rs
CommitLineData
c34b1796
AL
1// Evaluation of constants in refutable patterns goes through
2// different compiler control-flow paths.
3
2b03887a 4#![allow(unused_imports, warnings)]
c34b1796
AL
5
6use std::fmt;
7use std::{i8, i16, i32, i64, isize};
8use std::{u8, u16, u32, u64, usize};
9
10const NEG_128: i8 = -128;
2b03887a 11const NEG_NEG_128: i8 = -NEG_128; //~ ERROR constant
c34b1796
AL
12
13fn main() {
14 match -128i8 {
ff7c6d11 15 NEG_NEG_128 => println!("A"),
94b46f34 16 //~^ ERROR could not evaluate constant pattern
dfeec247 17 //~| ERROR could not evaluate constant pattern
c34b1796
AL
18 _ => println!("B"),
19 }
20}