]> git.lizzy.rs Git - rust.git/blob - tests/ui/option_env_unwrap.rs
Add `option-env-unwrap` lint
[rust.git] / tests / ui / option_env_unwrap.rs
1 #![warn(clippy::option_env_unwrap)]
2
3 macro_rules! option_env_unwrap {
4     ($env: expr) => {
5         option_env!($env).unwrap()
6     };
7 }
8
9 fn main() {
10     let _ = option_env!("HOME").unwrap();
11     let _ = option_env_unwrap!("HOME");
12 }