Remove redundant check_for_macros AST pass.
This commit is contained in:
parent
c2cab1fd58
commit
58d7e1bf70
2 changed files with 0 additions and 23 deletions
|
|
@ -747,10 +747,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
|
|||
"prelude injection",
|
||||
|| syntax::std_inject::maybe_inject_prelude(&sess.parse_sess, krate));
|
||||
|
||||
time(time_passes,
|
||||
"checking that all macro invocations are gone",
|
||||
|| syntax::ext::expand::check_for_macros(&sess.parse_sess, &krate));
|
||||
|
||||
time(time_passes,
|
||||
"checking for inline asm in case the target doesn't support it",
|
||||
|| no_asm::check_crate(sess, &krate));
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ use feature_gate::{self, Features};
|
|||
use fold;
|
||||
use fold::*;
|
||||
use util::move_map::MoveMap;
|
||||
use parse;
|
||||
use parse::token::{fresh_mark, fresh_name, intern, keywords};
|
||||
use ptr::P;
|
||||
use util::small_vector::SmallVector;
|
||||
|
|
@ -1212,24 +1211,6 @@ fn mark_tts(tts: &[TokenTree], m: Mrk) -> Vec<TokenTree> {
|
|||
noop_fold_tts(tts, &mut Marker{mark:m, expn_id: None})
|
||||
}
|
||||
|
||||
/// Check that there are no macro invocations left in the AST:
|
||||
pub fn check_for_macros(sess: &parse::ParseSess, krate: &ast::Crate) {
|
||||
visit::walk_crate(&mut MacroExterminator{sess:sess}, krate);
|
||||
}
|
||||
|
||||
/// A visitor that ensures that no macro invocations remain in an AST.
|
||||
struct MacroExterminator<'a>{
|
||||
sess: &'a parse::ParseSess
|
||||
}
|
||||
|
||||
impl<'a, 'v> Visitor<'v> for MacroExterminator<'a> {
|
||||
fn visit_mac(&mut self, mac: &ast::Mac) {
|
||||
self.sess.span_diagnostic.span_bug(mac.span,
|
||||
"macro exterminator: expected AST \
|
||||
with no macro invocations");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue