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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue