diff options
| author | bors <bors@rust-lang.org> | 2021-11-06 22:55:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-06 22:55:37 +0000 |
| commit | 089a016919b0a9daaed9f676804102d6ba3f8f9d (patch) | |
| tree | f46a71dfffab593de738042085740e615520c0a0 /compiler/rustc_trait_selection/src | |
| parent | 0727994435c75fdedd3e9d226cf434089b0ab585 (diff) | |
| parent | ec471de865b6f93f384d1903cc53c39a6057a8aa (diff) | |
| download | rust-089a016919b0a9daaed9f676804102d6ba3f8f9d.tar.gz rust-089a016919b0a9daaed9f676804102d6ba3f8f9d.zip | |
Auto merge of #90661 - matthiaskrgr:rollup-1umbdlx, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #90487 (Add a chapter on reading Rustdoc output) - #90508 (Apply adjustments for field expression even if inaccessible) - #90627 (Suggest dereference of `Box` when inner type is expected) - #90642 (use matches!() macro in more places) - #90646 (type error go brrrrrrrr) - #90649 (Run reveal_all on MIR when inlining is activated.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 60676ad3f4f..481bfa4a26b 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -320,10 +320,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { /// Returns `true` if the trait predicate is considerd `const` to this selection context. pub fn is_trait_predicate_const(&self, pred: ty::TraitPredicate<'_>) -> bool { - match pred.constness { - ty::BoundConstness::ConstIfConst if self.is_in_const_context => true, - _ => false, - } + matches!(pred.constness, ty::BoundConstness::ConstIfConst) && self.is_in_const_context } /// Returns `true` if the predicate is considered `const` to |
