Skip to content

Commit 0f285e3

Browse files
committed
Remove the one use of P<[T]>.
A `Vec` is fine, the additional word (vector vs. boxed slice) doesn't matter here.
1 parent 6973fa0 commit 0f285e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ pub enum ExprKind {
17141714
///
17151715
/// Usually not written directly in user code but
17161716
/// indirectly via the macro `core::mem::offset_of!(...)`.
1717-
OffsetOf(P<Ty>, P<[Ident]>),
1717+
OffsetOf(P<Ty>, Vec<Ident>),
17181718

17191719
/// A macro invocation; pre-expansion.
17201720
MacCall(P<MacCall>),

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ impl<'a> Parser<'a> {
11191119
/// Parse the field access used in offset_of, matched by `$(e:expr)+`.
11201120
/// Currently returns a list of idents. However, it should be possible in
11211121
/// future to also do array indices, which might be arbitrary expressions.
1122-
fn parse_floating_field_access(&mut self) -> PResult<'a, P<[Ident]>> {
1122+
fn parse_floating_field_access(&mut self) -> PResult<'a, Vec<Ident>> {
11231123
let mut fields = Vec::new();
11241124
let mut trailing_dot = None;
11251125

0 commit comments

Comments
 (0)