inject_panic_runtime(): Avoid double negation for 'any non rlib'
This commit is contained in:
parent
a00df61387
commit
a0e5aea0d2
1 changed files with 2 additions and 2 deletions
|
@ -701,8 +701,8 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
|
|||
fn inject_panic_runtime(&mut self, krate: &ast::Crate) {
|
||||
// If we're only compiling an rlib, then there's no need to select a
|
||||
// panic runtime, so we just skip this section entirely.
|
||||
let any_non_rlib = self.tcx.crate_types().iter().any(|ct| *ct != CrateType::Rlib);
|
||||
if !any_non_rlib {
|
||||
let only_rlib = self.tcx.crate_types().iter().all(|ct| *ct == CrateType::Rlib);
|
||||
if only_rlib {
|
||||
info!("panic runtime injection skipped, only generating rlib");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue