1
- pub mod visit {
1
+ use std:: ops:: DerefMut ;
2
+ use std:: panic;
3
+
4
+ use rustc_data_structures:: flat_map_in_place:: FlatMapInPlace ;
5
+ use rustc_data_structures:: stack:: ensure_sufficient_stack;
6
+ use rustc_data_structures:: sync:: Lrc ;
7
+ use rustc_span:: Span ;
8
+ use rustc_span:: source_map:: Spanned ;
9
+ use rustc_span:: symbol:: Ident ;
10
+ use smallvec:: { Array , SmallVec , smallvec} ;
11
+ use thin_vec:: ThinVec ;
12
+
13
+ use crate :: ast:: * ;
14
+ use crate :: ptr:: P ;
15
+ use crate :: token:: { self , Token } ;
16
+ use crate :: tokenstream:: * ;
2
17
18
+ pub mod visit {
3
19
//! AST walker. Each overridden visit method has full control over what
4
20
//! happens with its node, it can do its own traversal of the node's children,
5
21
//! call `visit::walk_*` to apply the default traversal algorithm, or prevent
@@ -17,11 +33,8 @@ pub mod visit {
17
33
18
34
pub use rustc_ast_ir:: visit:: VisitorResult ;
19
35
pub use rustc_ast_ir:: { try_visit, visit_opt, walk_list, walk_visitable_list} ;
20
- use rustc_span:: Span ;
21
- use rustc_span:: symbol:: Ident ;
22
36
23
- use crate :: ast:: * ;
24
- use crate :: ptr:: P ;
37
+ use super :: * ;
25
38
26
39
#[ derive( Copy , Clone , Debug , PartialEq ) ]
27
40
pub enum AssocCtxt {
@@ -1281,22 +1294,7 @@ pub mod mut_visit {
1281
1294
//! a `MutVisitor` renaming item names in a module will miss all of those
1282
1295
//! that are created by the expansion of a macro.
1283
1296
1284
- use std:: ops:: DerefMut ;
1285
- use std:: panic;
1286
-
1287
- use rustc_data_structures:: flat_map_in_place:: FlatMapInPlace ;
1288
- use rustc_data_structures:: stack:: ensure_sufficient_stack;
1289
- use rustc_data_structures:: sync:: Lrc ;
1290
- use rustc_span:: Span ;
1291
- use rustc_span:: source_map:: Spanned ;
1292
- use rustc_span:: symbol:: Ident ;
1293
- use smallvec:: { Array , SmallVec , smallvec} ;
1294
- use thin_vec:: ThinVec ;
1295
-
1296
- use crate :: ast:: * ;
1297
- use crate :: ptr:: P ;
1298
- use crate :: token:: { self , Token } ;
1299
- use crate :: tokenstream:: * ;
1297
+ use super :: * ;
1300
1298
use crate :: visit:: { AssocCtxt , BoundKind } ;
1301
1299
1302
1300
pub trait ExpectOne < A : Array > {
0 commit comments