Rollup merge of #79509 - GuillaumeGomez:improve-attr-spans, r=oli-obk
Improve attribute message error spans I got the idea while working on https://github.com/rust-lang/rust/pull/79464
This commit is contained in:
commit
3d631b094b
9 changed files with 68 additions and 39 deletions
|
@ -43,8 +43,7 @@ fn update_limit(
|
|||
|
||||
let value_span = attr
|
||||
.meta()
|
||||
.and_then(|meta| meta.name_value_literal().cloned())
|
||||
.map(|lit| lit.span)
|
||||
.and_then(|meta| meta.name_value_literal_span())
|
||||
.unwrap_or(attr.span);
|
||||
|
||||
let error_str = match e.kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue