diff options
| author | bors <bors@rust-lang.org> | 2022-09-29 05:12:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-29 05:12:30 +0000 |
| commit | 1536a53ea4798df052dc31a611c2f29c8f529be7 (patch) | |
| tree | 9708e8b6f8ad3d9c0a55dfc4234808ceb37aa104 /compiler/rustc_trait_selection/src/traits | |
| parent | bf40408165aacd48440e7fba4c1abcf293d8929c (diff) | |
| parent | 5c731cd796820a2968f880468efd1c2996c5efce (diff) | |
| download | rust-1536a53ea4798df052dc31a611c2f29c8f529be7.tar.gz rust-1536a53ea4798df052dc31a611c2f29c8f529be7.zip | |
Auto merge of #102450 - JohnTitor:rollup-ahleg93, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #98368 (Make `std::os::fd` public.) - #102085 (Code refactoring smart_resolve_report_errors) - #102351 (Improve E0585 help) - #102368 (Add a niche to `Duration`, unix `SystemTime`, and non-apple `Instant`) - #102393 (Add regression test for issue 94923) - #102399 (Account for use of index-based lifetime names in print of binder) - #102416 (remove FIXME, improve documentation) - #102433 (env::temp_dir: fix a typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 5e32a27cdb1..0ed59223337 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1737,12 +1737,12 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { (&ImplCandidate(other_def), &ImplCandidate(victim_def)) => { // See if we can toss out `victim` based on specialization. - // This requires us to know *for sure* that the `other` impl applies - // i.e., `EvaluatedToOk`. + // While this requires us to know *for sure* that the `other` impl applies + // we still use modulo regions here. // - // FIXME(@lcnr): Using `modulo_regions` here seems kind of scary - // to me but is required for `std` to compile, so I didn't change it - // for now. + // This is fine as specialization currently assumes that specializing + // impls have to be always applicable, meaning that the only allowed + // region constraints may be constraints also present on the default impl. let tcx = self.tcx(); if other.evaluation.must_apply_modulo_regions() { if tcx.specializes((other_def, victim_def)) { |
