Make MSVC detection ludicrously robust#34492
Conversation
There was a problem hiding this comment.
Perhaps this could just be:
match (arch, host_arch()) {
// ...
}Can you also add docs as to what's being returned here? It's not clear to me at least what these are vectors of nor what each element of the pair is.
f460adc to
40a7175
Compare
|
Updated Also added a commit with one function converted to use |
|
Yeah the logic has gotten complicated enough in a few places that I'd be fine using that macro for most of the functions, other than that looks good to me! |
19ebd6b to
570fd7a
Compare
|
I've converted what I could to using the macro. |
There was a problem hiding this comment.
This macro has been written at least twice in librustc under different names 😆
try_opt!:rust/src/librustc/dep_graph/dep_node.rs
Lines 13 to 20 in 382ab92
option_try!:rust/src/librustc/util/common.rs
Lines 72 to 74 in bb4b3fb
There was a problem hiding this comment.
Clearly this just indicates the need for this sort of macro in libstd. Sure would be nice if the new ? stuff supported Option.
|
Tidy looks like it's failing on travis, but otherwise r=me |
Should fix a few more edge cases Fixes rust-lang#31151 Fixes rust-lang#32159 Fixes rust-lang#34484 Improves rust-lang-deprecated/rust-packaging#50 Signed-off-by: Peter Atashian <retep998@gmail.com>
570fd7a to
a1b33b4
Compare
|
Travis appears to have passed. |
|
@bors r=alexcrichton |
|
📌 Commit a1b33b4 has been approved by |
|
⌛ Testing commit a1b33b4 with merge ed33659... |
|
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
|
@bors: retry
On Fri, Jul 1, 2016 at 5:38 AM, bors notifications@github.com wrote:
|
|
⌛ Testing commit a1b33b4 with merge 23095ae... |
|
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
Make MSVC detection ludicrously robust Resurrection of #31158 r? @alexcrichton
Resurrection of #31158
r? @alexcrichton