Remove some P-s
This commit is contained in:
parent
b75baad5c3
commit
10f234240d
@ -2695,7 +2695,7 @@ pub enum ItemKind {
|
||||
/// A use declaration item (`use`).
|
||||
///
|
||||
/// E.g., `use foo;`, `use foo::bar;` or `use foo::bar as FooBar;`.
|
||||
Use(P<UseTree>),
|
||||
Use(UseTree),
|
||||
/// A static item (`static`).
|
||||
///
|
||||
/// E.g., `static FOO: i32 = 42;` or `static FOO: &'static str = "bar";`.
|
||||
@ -2719,7 +2719,7 @@ pub enum ItemKind {
|
||||
/// E.g., `extern {}` or `extern "C" {}`.
|
||||
ForeignMod(ForeignMod),
|
||||
/// Module-level inline assembly (from `global_asm!()`).
|
||||
GlobalAsm(P<GlobalAsm>),
|
||||
GlobalAsm(GlobalAsm),
|
||||
/// A type alias (`type`).
|
||||
///
|
||||
/// E.g., `type Foo = Bar<u8>;`.
|
||||
|
@ -28,7 +28,7 @@ pub fn expand_global_asm<'cx>(
|
||||
ident: Ident::invalid(),
|
||||
attrs: Vec::new(),
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
kind: ast::ItemKind::GlobalAsm(P(global_asm)),
|
||||
kind: ast::ItemKind::GlobalAsm(global_asm),
|
||||
vis: ast::Visibility {
|
||||
span: sp.shrink_to_lo(),
|
||||
kind: ast::VisibilityKind::Inherited,
|
||||
|
@ -1,5 +1,4 @@
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_expand::base::{ExtCtxt, ResolverExpand};
|
||||
use rustc_expand::expand::ExpansionConfig;
|
||||
use rustc_session::Session;
|
||||
@ -72,11 +71,11 @@ pub fn inject(
|
||||
span,
|
||||
Ident::invalid(),
|
||||
vec![cx.attribute(cx.meta_word(span, sym::prelude_import))],
|
||||
ast::ItemKind::Use(P(ast::UseTree {
|
||||
ast::ItemKind::Use(ast::UseTree {
|
||||
prefix: cx.path(span, import_path),
|
||||
kind: ast::UseTreeKind::Glob,
|
||||
span,
|
||||
})),
|
||||
}),
|
||||
);
|
||||
|
||||
krate.items.insert(0, use_item);
|
||||
|
@ -225,7 +225,7 @@ impl<'a> Parser<'a> {
|
||||
return Err(e);
|
||||
}
|
||||
|
||||
(Ident::invalid(), ItemKind::Use(P(tree)))
|
||||
(Ident::invalid(), ItemKind::Use(tree))
|
||||
} else if self.check_fn_front_matter() {
|
||||
// FUNCTION ITEM
|
||||
let (ident, sig, generics, body) = self.parse_fn(attrs, req_name, lo)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user