1
Fork 0

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:
Guillaume Gomez 2020-12-01 23:46:11 +01:00 committed by GitHub
commit 3d631b094b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 68 additions and 39 deletions

View file

@ -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() {