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>2025-04-06 18:08:11 +0200
committerGitHub <noreply@github.com>2025-04-06 18:08:11 +0200
commitb1d67b24920d55f59098653bbb7d38fc6c7bf43b (patch)
tree5b551418bba80f64351e1a2c8d2b5e1caaf87342 /compiler/rustc_mir_transform/src
parented81e347f189a51946fb58210b147228597aef00 (diff)
parent6b5ccfc87f59ab017032e430d4d358b4989735da (diff)
downloadrust-b1d67b24920d55f59098653bbb7d38fc6c7bf43b.tar.gz
rust-b1d67b24920d55f59098653bbb7d38fc6c7bf43b.zip
Rollup merge of #139391 - TaKO8Ki:check-if-merged-attrs-list-is-empty, r=jdonszelmann
Check if merged attributes list is empty in expr

Fixes #139373

In the example code, an [`UnrecognizedReprHint`](https://github.com/rust-lang/rust/blob/6b5ccfc87f59ab017032e430d4d358b4989735da/compiler/rustc_attr_parsing/src/attributes/repr.rs#L155) error is output, and the list of merged attributes becomes empty. This causes a [panic](https://github.com/rust-lang/rust/blob/6b5ccfc87f59ab017032e430d4d358b4989735da/compiler/rustc_ast_lowering/src/lib.rs#L618) to occur. So, it's necessary to check if merged attributes list is empty as other functions do.

ref: https://github.com/rust-lang/rust/blob/6b5ccfc87f59ab017032e430d4d358b4989735da/compiler/rustc_ast_lowering/src/lib.rs#L896
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions