]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/promotion.rs
Update tests to remove old numeric constants
[rust.git] / src / test / ui / consts / promotion.rs
1 // check-pass
2
3 // compile-flags: -O
4
5 fn foo(_: &'static [&'static str]) {}
6 fn bar(_: &'static [&'static str; 3]) {}
7 fn baz_i32(_: &'static i32) {}
8 fn baz_u32(_: &'static u32) {}
9
10 fn main() {
11     foo(&["a", "b", "c"]);
12     bar(&["d", "e", "f"]);
13
14     // make sure that these do not cause trouble despite overflowing
15     baz_u32(&(0-1));
16     baz_i32(&-i32::MIN);
17 }