about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-11-15 23:38:12 +0100
committerGitHub <noreply@github.com>2024-11-15 23:38:12 +0100
commitfc8d2b38d8105dd9a57e4c8adda0f617f5b7e751 (patch)
treec8182073c2e9ac552a5243db6e58d4d063381850 /compiler/rustc_mir_transform/src
parentc3a632c28bc8d175d228f35aaa370dc50929e3da (diff)
parent03e2828e8876e9c2d2ec9238d9cdce82e7b93798 (diff)
downloadrust-fc8d2b38d8105dd9a57e4c8adda0f617f5b7e751.tar.gz
rust-fc8d2b38d8105dd9a57e4c8adda0f617f5b7e751.zip
Rollup merge of #133080 - ehuss:edition-desugar-span, r=compiler-errors
Fix span edition for 2024 RPIT coming from an external macro

This fixes a problem where code generated by an external macro with an RPIT would end up using the call-site edition instead of the macro's edition for the RPIT. When used from a 2024 crate, this caused the code to change behavior to the 2024 capturing rules, which we don't want.

This was caused by the impl-trait lowering code would replace the span with one marked with `DesugaringKind::OpaqueTy` desugaring. However, it was also overriding the edition of the span with the edition of the local crate. Instead it should be using the edition of the span itself.

Fixes https://github.com/rust-lang/rust/issues/132917
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions