use P<[Ident]> instead of Vec<Ident>
This commit is contained in:
parent
b92c2f792c
commit
631ea7cc15
@ -1471,7 +1471,7 @@ pub enum ExprKind {
|
||||
InlineAsm(P<InlineAsm>),
|
||||
|
||||
/// Output of the `offset_of!()` macro.
|
||||
OffsetOf(P<Ty>, Vec<Ident>),
|
||||
OffsetOf(P<Ty>, P<[Ident]>),
|
||||
|
||||
/// A macro invocation; pre-expansion.
|
||||
MacCall(P<MacCall>),
|
||||
|
@ -1458,7 +1458,7 @@ pub fn noop_visit_expr<T: MutVisitor>(
|
||||
ExprKind::FormatArgs(fmt) => vis.visit_format_args(fmt),
|
||||
ExprKind::OffsetOf(container, fields) => {
|
||||
vis.visit_ty(container);
|
||||
for field in fields {
|
||||
for field in fields.iter_mut() {
|
||||
vis.visit_ident(field);
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ fn parse_args<'a>(
|
||||
cx: &mut ExtCtxt<'a>,
|
||||
sp: Span,
|
||||
tts: TokenStream,
|
||||
) -> PResult<'a, (P<ast::Ty>, Vec<Ident>)> {
|
||||
) -> PResult<'a, (P<ast::Ty>, P<[Ident]>)> {
|
||||
let mut p = cx.new_parser_from_tts(tts);
|
||||
|
||||
let container = p.parse_ty()?;
|
||||
@ -71,7 +71,7 @@ fn parse_args<'a>(
|
||||
break;
|
||||
}
|
||||
|
||||
Ok((container, fields))
|
||||
Ok((container, fields.into()))
|
||||
}
|
||||
|
||||
pub fn expand_offset_of<'cx>(
|
||||
|
Loading…
x
Reference in New Issue
Block a user