about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-12 20:26:35 +0000
committerbors <bors@rust-lang.org>2025-02-12 20:26:35 +0000
commitef148cd7eb00a5a973130dc6473da71fd6c487ee (patch)
treed355ad9542f2c7b39e7ab32b08b8b670869ebbcd /compiler/rustc_trait_selection
parentced8e650cddbafad92094b2c89dee97b8a807d9c (diff)
parent8567fbb4b5b5153a7789d7eb76a8a46700183a1c (diff)
downloadrust-ef148cd7eb00a5a973130dc6473da71fd6c487ee.tar.gz
rust-ef148cd7eb00a5a973130dc6473da71fd6c487ee.zip
Auto merge of #136943 - GuillaumeGomez:rollup-amtd3mq, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - #136758 (tests: `-Copt-level=3` instead of `-O` in assembly tests)
 - #136761 (tests: `-Copt-level=3` instead of `-O` in codegen tests)
 - #136784 (Nuke `Buffer` abstraction from `librustdoc`, take 2 💣)
 - #136838 (Check whole `Unsize` predicate for escaping bound vars)
 - #136848 (add docs and ut for bootstrap util cache)
 - #136871 (dev-guide: Link to `t-lang` procedures for new features)
 - #136890 (Change swap_nonoverlapping from lang to library UB)
 - #136901 (compiler: give `ExternAbi` truly stable `Hash` and `Ord`)
 - #136907 (compiler: Make middle errors `pub(crate)` and bury the dead code)
 - #136916 (use cc archiver as default in `cc2ar`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
index e495bdbf782..bfab009a7e3 100644
--- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
@@ -920,11 +920,12 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
         //     T: Trait
         // so it seems ok if we (conservatively) fail to accept that `Unsize`
         // obligation above. Should be possible to extend this in the future.
-        let Some(source) = obligation.self_ty().no_bound_vars() else {
+        let Some(trait_pred) = obligation.predicate.no_bound_vars() else {
             // Don't add any candidates if there are bound regions.
             return;
         };
-        let target = obligation.predicate.skip_binder().trait_ref.args.type_at(1);
+        let source = trait_pred.self_ty();
+        let target = trait_pred.trait_ref.args.type_at(1);
 
         debug!(?source, ?target, "assemble_candidates_for_unsizing");