2023-07-27 13:23:04 +00:00
|
|
|
//@aux-build:proc_macros.rs
|
2020-02-09 00:44:35 +00:00
|
|
|
#![warn(clippy::option_env_unwrap)]
|
2021-12-01 14:38:54 +00:00
|
|
|
#![allow(clippy::map_flatten)]
|
2020-02-09 00:44:35 +00:00
|
|
|
|
2023-03-07 14:40:55 +00:00
|
|
|
extern crate proc_macros;
|
|
|
|
use proc_macros::{external, inline_macros};
|
2020-02-09 00:44:35 +00:00
|
|
|
|
2023-03-07 14:40:55 +00:00
|
|
|
#[inline_macros]
|
2020-02-09 00:44:35 +00:00
|
|
|
fn main() {
|
2020-02-09 22:12:40 +00:00
|
|
|
let _ = option_env!("PATH").unwrap();
|
|
|
|
let _ = option_env!("PATH").expect("environment variable PATH isn't set");
|
2023-05-06 22:08:46 +00:00
|
|
|
let _ = option_env!("__Y__do_not_use").unwrap(); // This test only works if you don't have a __Y__do_not_use env variable in your environment.
|
2023-03-07 14:40:55 +00:00
|
|
|
let _ = inline!(option_env!($"PATH").unwrap());
|
|
|
|
let _ = inline!(option_env!($"PATH").expect($"environment variable PATH isn't set"));
|
|
|
|
let _ = external!(option_env!($"PATH").unwrap());
|
|
|
|
let _ = external!(option_env!($"PATH").expect($"environment variable PATH isn't set"));
|
2020-02-09 00:44:35 +00:00
|
|
|
}
|