From ae213db0f5d9a513cae9624b1a341f516bb8e1e9 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 5 Jan 2020 11:21:26 +0100 Subject: [PATCH] {syntax -> rustc_ast_passes}::show_span --- src/librustc_ast_passes/lib.rs | 1 + src/{libsyntax => librustc_ast_passes}/show_span.rs | 6 +++--- src/librustc_interface/passes.rs | 2 +- src/libsyntax/lib.rs | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) rename src/{libsyntax => librustc_ast_passes}/show_span.rs (96%) diff --git a/src/librustc_ast_passes/lib.rs b/src/librustc_ast_passes/lib.rs index f8771471e00..eadbc485296 100644 --- a/src/librustc_ast_passes/lib.rs +++ b/src/librustc_ast_passes/lib.rs @@ -6,3 +6,4 @@ pub mod ast_validation; pub mod feature_gate; +pub mod show_span; diff --git a/src/libsyntax/show_span.rs b/src/librustc_ast_passes/show_span.rs similarity index 96% rename from src/libsyntax/show_span.rs rename to src/librustc_ast_passes/show_span.rs index b70e2ce0d3e..4596e8ff53d 100644 --- a/src/libsyntax/show_span.rs +++ b/src/librustc_ast_passes/show_span.rs @@ -5,9 +5,9 @@ use std::str::FromStr; -use crate::ast; -use crate::visit; -use crate::visit::Visitor; +use syntax::ast; +use syntax::visit; +use syntax::visit::Visitor; enum Mode { Expression, diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index 951fc63fe95..6322cc4b9a3 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -70,7 +70,7 @@ pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> { } if let Some(ref s) = sess.opts.debugging_opts.show_span { - syntax::show_span::run(sess.diagnostic(), s, &krate); + rustc_ast_passes::show_span::run(sess.diagnostic(), s, &krate); } if sess.opts.debugging_opts.hir_stats { diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index fcefe3d2a02..a96fee0cf8f 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -77,7 +77,6 @@ pub mod entry; pub mod expand; pub mod mut_visit; pub mod ptr; -pub mod show_span; pub use rustc_session::parse as sess; pub mod token; pub mod tokenstream;