about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-04 14:37:30 +0000
committerbors <bors@rust-lang.org>2025-07-04 14:37:30 +0000
commit0c4fa2690de945f062668acfc36b3f8cfbd013e2 (patch)
tree2e57f7883dc3c6de58c406d64b53638140e19a16 /compiler/rustc_middle
parent556d20a834126d2d0ac20743b9792b8474d6d03c (diff)
parent3a5da6c4d82a9d7d191ff8d2bfbd8350487ad855 (diff)
downloadrust-0c4fa2690de945f062668acfc36b3f8cfbd013e2.tar.gz
rust-0c4fa2690de945f062668acfc36b3f8cfbd013e2.zip
Auto merge of #143434 - matthiaskrgr:rollup-eyr4rcb, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#140643 (Refactor StableMIR)
 - rust-lang/rust#143286 (Make -Ztrack-diagnostics emit like a note)
 - rust-lang/rust#143308 (Remove `PointerLike` trait)
 - rust-lang/rust#143387 (Make __rust_alloc_error_handler_should_panic a function)
 - rust-lang/rust#143400 (Port `#[rustc_pass_by_value]` to the new attribute system)
 - rust-lang/rust#143417 (bump termize dep)
 - rust-lang/rust#143420 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/ty/mod.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs
index 7f79cd5d468..a92d6fe3916 100644
--- a/compiler/rustc_middle/src/ty/mod.rs
+++ b/compiler/rustc_middle/src/ty/mod.rs
@@ -1149,12 +1149,16 @@ impl<'tcx> TypingEnv<'tcx> {
     {
         // FIXME(#132279): We should assert that the value does not contain any placeholders
         // as these placeholders are also local to the current inference context. However, we
-        // currently use pseudo-canonical queries in the trait solver which replaces params with
-        // placeholders. We should also simply not use pseudo-canonical queries in the trait
-        // solver, at which point we can readd this assert. As of writing this comment, this is
-        // only used by `fn layout_is_pointer_like` when calling `layout_of`.
+        // currently use pseudo-canonical queries in the trait solver, which replaces params
+        // with placeholders during canonicalization. We should also simply not use pseudo-
+        // canonical queries in the trait solver, at which point we can readd this assert.
         //
-        // debug_assert!(!value.has_placeholders());
+        // As of writing this comment, this is only used when normalizing consts that mention
+        // params.
+        /* debug_assert!(
+            !value.has_placeholders(),
+            "{value:?} which has placeholder shouldn't be pseudo-canonicalized"
+        ); */
         PseudoCanonicalInput { typing_env: self, value }
     }
 }