diff options
| author | bors <bors@rust-lang.org> | 2016-06-03 08:22:54 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-06-03 08:22:54 -0700 |
| commit | 1ceaa86e0adfcee66e549e975b2afeeb7ae8a34b (patch) | |
| tree | bf65461314e03edb17ae2cf487397fa9e964a932 /src/libsyntax | |
| parent | 9552bcdd92dfd09049ce9dd299b4bfc513ac075d (diff) | |
| parent | 3fc0407fb39baa6f0048ff30c5f8f9cc8eba269c (diff) | |
| download | rust-1ceaa86e0adfcee66e549e975b2afeeb7ae8a34b.tar.gz rust-1ceaa86e0adfcee66e549e975b2afeeb7ae8a34b.zip | |
Auto merge of #33997 - jseyfried:resolve_in_phase_2, r=nrc
Move name resolution into phase 2 r? @nrc
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index c3202dbdbb4..d3f5a573218 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -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 { |
