mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
16 lines
618 B
Rust
16 lines
618 B
Rust
//@aux-build:proc_macros.rs:proc-macro
|
|
#![warn(clippy::option_env_unwrap)]
|
|
#![allow(clippy::map_flatten)]
|
|
|
|
extern crate proc_macros;
|
|
use proc_macros::{external, inline_macros};
|
|
|
|
#[inline_macros]
|
|
fn main() {
|
|
let _ = option_env!("PATH").unwrap();
|
|
let _ = option_env!("PATH").expect("environment variable PATH isn't set");
|
|
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"));
|
|
}
|