diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2020-10-22 11:42:44 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2020-10-28 20:09:20 -0700 |
| commit | 0e88db7db4c09c63ba8a0036d34e72bd48719bd1 (patch) | |
| tree | 06918207d954eaca15caa69eae65dbb9947138a4 /compiler/rustc_session/src | |
| parent | a9cd294cf2775441e713c7ee2918b728733b99f5 (diff) | |
| download | rust-0e88db7db4c09c63ba8a0036d34e72bd48719bd1.tar.gz rust-0e88db7db4c09c63ba8a0036d34e72bd48719bd1.zip | |
Dogfood {exclusive,half-open} ranges in compiler (nfc)
In particular, this allows us to write more explicit matches that avoid the pitfalls of using a fully general fall-through case, yet remain fairly ergonomic. Less logic is in guard cases, more is in the actual exhaustive case analysis. No functional changes.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/filesearch.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index 12a268d5b1d..55ee4e52082 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -153,14 +153,14 @@ fn find_libdir(sysroot: &Path) -> Cow<'static, str> { const SECONDARY_LIB_DIR: &str = "lib"; match option_env!("CFG_LIBDIR_RELATIVE") { - Some(libdir) if libdir != "lib" => libdir.into(), - _ => { + None | Some("lib") => { if sysroot.join(PRIMARY_LIB_DIR).join(RUST_LIB_DIR).exists() { PRIMARY_LIB_DIR.into() } else { SECONDARY_LIB_DIR.into() } } + Some(libdir) => libdir.into(), } } |
