mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-18 18:58:45 +00:00
b48b221f80
The tests were failing on windows because the `HOME` env variable doesn't exist on it so using the `PATH` variable to test instead.
61 lines
2.7 KiB
Text
61 lines
2.7 KiB
Text
error: this will panic at run-time if the environment variable doesn't exist at compile-time
|
|
--> $DIR/option_env_unwrap.rs:17:13
|
|
|
|
|
LL | let _ = option_env!("PATH").unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::option-env-unwrap` implied by `-D warnings`
|
|
= help: consider using the `env!` macro instead
|
|
|
|
error: this will panic at run-time if the environment variable doesn't exist at compile-time
|
|
--> $DIR/option_env_unwrap.rs:18:13
|
|
|
|
|
LL | let _ = option_env!("PATH").expect("environment variable PATH isn't set");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using the `env!` macro instead
|
|
|
|
error: this will panic at run-time if the environment variable doesn't exist at compile-time
|
|
--> $DIR/option_env_unwrap.rs:9:9
|
|
|
|
|
LL | option_env!($env).unwrap()
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | let _ = option_env_unwrap!("PATH");
|
|
| -------------------------- in this macro invocation
|
|
|
|
|
= help: consider using the `env!` macro instead
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: this will panic at run-time if the environment variable doesn't exist at compile-time
|
|
--> $DIR/option_env_unwrap.rs:12:9
|
|
|
|
|
LL | option_env!($env).expect($message)
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | let _ = option_env_unwrap!("PATH", "environment variable PATH isn't set");
|
|
| ----------------------------------------------------------------- in this macro invocation
|
|
|
|
|
= help: consider using the `env!` macro instead
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: this will panic at run-time if the environment variable doesn't exist at compile-time
|
|
--> $DIR/option_env_unwrap.rs:21:13
|
|
|
|
|
LL | let _ = option_env_unwrap_external!("PATH");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using the `env!` macro instead
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: this will panic at run-time if the environment variable doesn't exist at compile-time
|
|
--> $DIR/option_env_unwrap.rs:22:13
|
|
|
|
|
LL | let _ = option_env_unwrap_external!("PATH", "environment variable PATH isn't set");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using the `env!` macro instead
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 6 previous errors
|
|
|