Don't panic on std::env::vars() when env is null.#53208
Don't panic on std::env::vars() when env is null.#53208bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
The change itself seems completely reasonable to me; good catch. I don't know whether you can use |
|
It seems to, it runs first anyway, and they all pass. That was a concern for me as well. |
|
The only other thing is trusting |
|
Wouldn't other tests (not just the environment tests) get compiled into the same binary? I'm concerned about the tests being fragile. |
|
The binary that runs is |
|
@BurntPizza Ah, OK. No objection in that case, but I don't know if you can use |
|
The main |
|
Thanks for the PR! The dev-dependency here should work out fine but @joshtriplett is right in that this shouldn't be executing in the main body of tests. Rather can a new entirely standalone program be added to Finally I do think that this'll need a |
0cb7099 to
c9aca02
Compare
|
Rebased with changes. |
|
@bors: r+ Thanks! |
|
📌 Commit c9aca02 has been approved by |
… r=alexcrichton Don't panic on std::env::vars() when env is null. Fixes rust-lang#53200. Reviewer(s): * Do I need to do any `#[cfg()]` here? * Is this use of libc ok for a dev-dependency?
… r=alexcrichton Don't panic on std::env::vars() when env is null. Fixes rust-lang#53200. Reviewer(s): * Do I need to do any `#[cfg()]` here? * Is this use of libc ok for a dev-dependency?
… r=alexcrichton Don't panic on std::env::vars() when env is null. Fixes rust-lang#53200. Reviewer(s): * Do I need to do any `#[cfg()]` here? * Is this use of libc ok for a dev-dependency?
Rollup of 11 pull requests Successful merges: - #53112 (pretty print BTreeSet) - #53208 (Don't panic on std::env::vars() when env is null.) - #53226 (driver: set the syntax edition in phase 1) - #53229 (Make sure rlimit is only ever increased) - #53233 (targets: aarch64: Add bare-metal aarch64 target) - #53239 (rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.) - #53246 (A few cleanups) - #53257 (Idiomatic improvements to IP method) - #53274 (Remove statics field from CodegenCx) - #53290 (Make LLVM emit assembly comments with -Z asm-comments) - #53317 (Mark prior failure to avoid ICE)
Fixes #53200.
Reviewer(s):
#[cfg()]here?