Rollup merge of #78244 - workingjubilee:dogfood-fancy-ranges, r=varkor
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.
This commit is contained in:
commit
9867e54bea
6 changed files with 14 additions and 10 deletions
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue