]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-cross-crate-const.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-cross-crate-const.rs
1 // run-pass
2 // aux-build:cci_const.rs
3 #![allow(non_upper_case_globals)]
4
5 extern crate cci_const;
6 static foo: &'static str = cci_const::foopy;
7 static a: usize = cci_const::uint_val;
8 static b: usize = cci_const::uint_expr + 5;
9
10 pub fn main() {
11     assert_eq!(a, 12);
12     let foo2 = a;
13     assert_eq!(foo2, cci_const::uint_val);
14     assert_eq!(b, cci_const::uint_expr + 5);
15     assert_eq!(foo, cci_const::foopy);
16 }