Skip to content

Commit 0f98581

Browse files
Replace AstBuilder with inherent methods
1 parent c9bd4a0 commit 0f98581

30 files changed

+130
-435
lines changed

src/doc/unstable-book/src/language-features/plugin.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ extern crate rustc_plugin;
5959
use syntax::parse::token::{self, Token};
6060
use syntax::tokenstream::TokenTree;
6161
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
62-
use syntax::ext::build::AstBuilder; // A trait for expr_usize.
6362
use syntax_pos::Span;
6463
use rustc_plugin::Registry;
6564
@@ -164,13 +163,6 @@ can continue and find further errors.
164163
To print syntax fragments for debugging, you can use `span_note` together with
165164
`syntax::print::pprust::*_to_string`.
166165

167-
The example above produced an integer literal using `AstBuilder::expr_usize`.
168-
As an alternative to the `AstBuilder` trait, `libsyntax` provides a set of
169-
quasiquote macros. They are undocumented and very rough around the edges.
170-
However, the implementation may be a good starting point for an improved
171-
quasiquote as an ordinary plugin library.
172-
173-
174166
# Lint plugins
175167

176168
Plugins can extend [Rust's lint

src/libsyntax/attr/builtin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use crate::ast::{self, Attribute, MetaItem, NestedMetaItem};
44
use crate::early_buffered_lints::BufferedEarlyLintId;
55
use crate::ext::base::ExtCtxt;
6-
use crate::ext::build::AstBuilder;
76
use crate::feature_gate::{Features, GatedCfg};
87
use crate::parse::ParseSess;
98

src/libsyntax/diagnostics/plugin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::env;
44
use crate::ast::{self, Ident, Name};
55
use crate::source_map;
66
use crate::ext::base::{ExtCtxt, MacEager, MacResult};
7-
use crate::ext::build::AstBuilder;
87
use crate::parse::token::{self, Token};
98
use crate::ptr::P;
109
use crate::symbol::kw;

0 commit comments

Comments
 (0)