about summary refs log tree commit diff
path: root/tests/ui/proc-macro/env.rs
blob: fc248f8835964c3388fbdc3e42e575b8eac181bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ proc-macro: env.rs
//@ run-pass
//@ rustc-env: THE_CONST=1
//@ compile-flags: -Zunstable-options --env-set THE_CONST=12 --env-set ANOTHER=4
//@ ignore-backends: gcc

#![crate_name = "foo"]

extern crate env;

use env::generate_const;

generate_const!();

fn main() {
    assert_eq!(THE_CONST, 12);
    assert_eq!(ANOTHER, 1);
}