diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-03-08 09:42:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-08 09:42:09 +0100 |
| commit | 54a5073af99ec927ceaa01de90743534cbd39e80 (patch) | |
| tree | 1607c0c9291d6b5c1c399acfde742783cd169ffa /src/libsyntax/parse | |
| parent | 1d33fc9975dff3d61c4c2202daca5368d368df80 (diff) | |
| parent | 02eb523d91a2acbb78c9c1ca305e03d88d6dd985 (diff) | |
| download | rust-54a5073af99ec927ceaa01de90743534cbd39e80.tar.gz rust-54a5073af99ec927ceaa01de90743534cbd39e80.zip | |
Rollup merge of #58961 - estebank:issue-58462, r=varkor
On incorrect cfg literal/identifier, point at the right span CC #58462
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index e7937f57002..e93e15f9012 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -285,8 +285,8 @@ impl<'a> Parser<'a> { } let found = self.this_token_to_string(); - let msg = format!("expected unsuffixed literal or identifier, found {}", found); - Err(self.diagnostic().struct_span_err(lo, &msg)) + let msg = format!("expected unsuffixed literal or identifier, found `{}`", found); + Err(self.diagnostic().struct_span_err(self.span, &msg)) } /// matches meta_seq = ( COMMASEP(meta_item_inner) ) |
