| commit | 8155e58ba1c8c26a2cb37ad054272359a507a928 | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Mon May 11 00:05:02 2020 -0700 |
| committer | David Tolnay <dtolnay@gmail.com> | Mon May 11 00:15:12 2020 -0700 |
| tree | cf724ee27ef9edc2857cecdc4adb2eda66eedd61 | |
| parent | a954fcaddeb7a308af33b1fa9b39939453eea4d5 [diff] [blame] |
Treat unexpected tokens in repr attribute as unexpected repr
diff --git a/syntax/attrs.rs b/syntax/attrs.rs index 16541a3..4c76641 100644 --- a/syntax/attrs.rs +++ b/syntax/attrs.rs
@@ -88,7 +88,9 @@ let ident: Ident = input.parse()?; if let Some(atom) = Atom::from(&ident) { match atom { - U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize => return Ok(atom), + U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize if input.is_empty() => { + return Ok(atom); + } _ => {} } }