summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/parse_ints.rs
blob: 6a7e157ea50397fd6d42c4271a53389d53ca1dea (plain)
1
2
3
4
5
6
7
8
9
10
//@ ignore-backends: gcc

const _OK: () = match i32::from_str_radix("-1234", 10) {
    Ok(x) => assert!(x == -1234),
    Err(_) => panic!(),
};
const _TOO_LOW: () = { u64::from_str_radix("12345ABCD", 1); }; //~ ERROR radix must lie in the range `[2, 36]`
const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); }; //~ ERROR radix must lie in the range `[2, 36]`

fn main () {}