rust/tests/ui/cross-crate/const-cross-crate-const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
412 B
Rust
Raw Normal View History

// run-pass
2013-03-07 06:30:20 +00:00
// aux-build:cci_const.rs
#![allow(non_upper_case_globals)]
extern crate cci_const;
static foo: &'static str = cci_const::foopy;
static a: usize = cci_const::uint_val;
static b: usize = cci_const::uint_expr + 5;
2013-03-07 06:30:20 +00:00
pub fn main() {
assert_eq!(a, 12);
2013-03-07 06:30:20 +00:00
let foo2 = a;
assert_eq!(foo2, cci_const::uint_val);
assert_eq!(b, cci_const::uint_expr + 5);
assert_eq!(foo, cci_const::foopy);
2013-03-07 06:30:20 +00:00
}