Rollup merge of #147764 - beepster4096:oopsies_sorry, r=saethlin

Undo CopyForDeref assertion in const qualif

Fixes rust-lang/rust#147733 caused by rust-lang/rust#145513

This code in fact does not run only on runtime MIR.
This commit is contained in:
Matthias Krüger
2025-10-18 08:08:38 +02:00
committed by GitHub
3 changed files with 28 additions and 1 deletions

View File

@@ -234,7 +234,7 @@ where
Rvalue::Discriminant(place) => in_place::<Q, _>(cx, in_local, place.as_ref()),
Rvalue::CopyForDeref(_) => bug!("`CopyForDeref` in runtime MIR"),
Rvalue::CopyForDeref(place) => in_place::<Q, _>(cx, in_local, place.as_ref()),
Rvalue::Use(operand)
| Rvalue::Repeat(operand, _)