mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
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.
This commit is contained in:
parent
f7f8bdf2e0
commit
6ee87ae594
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user