Skip to content

Commit d4aa932

Browse files
committed
Fix c2rust-refactor for new Attribute item fields
1 parent 48a6df4 commit d4aa932

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

c2rust-refactor/src/collapse/nt_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ as_nonterminal_impl!(Ty, NtTy, P);
152152
//as_nonterminal_impl!(Ident, NtIdent);
153153
//as_nonterminal_impl!(Lifetime, NtLifetime);
154154
//as_nonterminal_impl!(Expr??, NtLiteral, P);
155-
as_nonterminal_impl!(MetaItem, NtMeta);
155+
as_nonterminal_impl!(AttrItem, NtMeta);
156156
as_nonterminal_impl!(Path, NtPath);
157157
as_nonterminal_impl!(Visibility, NtVis);
158158
as_nonterminal_impl!(TokenTree, NtTT);

c2rust-refactor/src/transform/ownership.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ fn make_attr(name: &str, tokens: TokenStream) -> Attribute {
279279
Attribute {
280280
id: AttrId(0),
281281
style: AttrStyle::Outer,
282-
path: mk().path(vec![name]),
283-
tokens: tokens,
282+
item: AttrItem {
283+
path: mk().path(vec![name]),
284+
tokens: tokens,
285+
},
284286
is_sugared_doc: false,
285287
span: DUMMY_SP,
286288
}

0 commit comments

Comments
 (0)