Skip to content

Commit

Permalink
Unrolled build for rust-lang#130244
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#130244 - samueltardieu:qmark-expansion-span-fix, r=jieyouxu

Use the same span for attributes and Try expansion of ?

This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code.

rust-lang/rust-clippy#13380 exhibits a manifestation of this problem and will be fixed by this change.
  • Loading branch information
rust-timer committed Sep 12, 2024
2 parents 8d6b88b + 6ee87ae commit 3131511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
Safety::Default,
sym::allow,
sym::unreachable_code,
self.lower_span(span),
try_span,
);
let attrs: AttrVec = thin_vec![attr];

Expand Down

0 comments on commit 3131511

Please sign in to comment.