summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/parse_ints.rs
blob: ff9fc47e65c333e1d2b7294d08bf53d3f6ae3fa3 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(const_int_from_str)]

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); };
const _TOO_HIGH: () = { u64::from_str_radix("12345ABCD", 37); };

fn main () {}