Handle repr attribute consistently with every other serde attribute
This commit is contained in:
parent
ea2f7b81d9
commit
e4e2956e79
@ -583,7 +583,7 @@ impl Container {
|
||||
|
||||
let mut is_packed = false;
|
||||
for attr in &item.attrs {
|
||||
if attr.path.is_ident("repr") {
|
||||
if attr.path == REPR {
|
||||
let _ = attr.parse_args_with(|input: ParseStream| {
|
||||
while let Some(token) = input.parse()? {
|
||||
if let TokenTree::Ident(ident) = token {
|
||||
|
@ -23,6 +23,7 @@ pub const OTHER: Symbol = Symbol("other");
|
||||
pub const REMOTE: Symbol = Symbol("remote");
|
||||
pub const RENAME: Symbol = Symbol("rename");
|
||||
pub const RENAME_ALL: Symbol = Symbol("rename_all");
|
||||
pub const REPR: Symbol = Symbol("repr");
|
||||
pub const SERDE: Symbol = Symbol("serde");
|
||||
pub const SERIALIZE: Symbol = Symbol("serialize");
|
||||
pub const SERIALIZE_WITH: Symbol = Symbol("serialize_with");
|
||||
|
Loading…
x
Reference in New Issue
Block a user