2023-12-11 09:43:57 -06:00
|
|
|
//@ aux-build:env.rs
|
|
|
|
//@ run-pass
|
|
|
|
//@ rustc-env: THE_CONST=1
|
2024-01-12 04:02:57 -06:00
|
|
|
//@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4
|
2023-12-11 09:43:57 -06:00
|
|
|
|
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
extern crate env;
|
|
|
|
|
|
|
|
use env::generate_const;
|
|
|
|
|
|
|
|
generate_const!();
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(THE_CONST, 12);
|
|
|
|
assert_eq!(ANOTHER, 1);
|
|
|
|
}
|