File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 799690bea0dbcf427bf7a9a813fec163eedf217d
2
+ refs/heads/master: e056ffa17d8dad336a3f8380d3d23f282f7f067d
Original file line number Diff line number Diff line change @@ -123,12 +123,10 @@ fn inject_libcore_reference(sess: session::session,
123
123
let vi1 = spanned ( ast:: view_item_use ( "core" , [ ] , n1) ) ;
124
124
let vi2 = spanned ( ast:: view_item_import_glob ( @[ "core" ] , n2) ) ;
125
125
126
- let cd1 = spanned ( ast:: cdir_view_item ( vi1) ) ;
127
- let cd2 = spanned ( ast:: cdir_view_item ( vi2) ) ;
126
+ let vis = [ vi1, vi2] + crate . node. module . view_items ;
128
127
129
- let cdirs = [ cd1, cd2] + crate . node. directives ;
130
-
131
- ret @{ node : { directives: cdirs with crate . node } with * crate }
128
+ ret @{ node : { module : { view_items : vis with crate . node. module }
129
+ with crate . node } with * crate }
132
130
}
133
131
134
132
Original file line number Diff line number Diff line change @@ -60,7 +60,14 @@ type crate_ =
60
60
tag crate_directive_ {
61
61
cdir_src_mod( ident, [ attribute] ) ;
62
62
cdir_dir_mod ( ident, [ @crate_directive] , [ attribute] ) ;
63
+
64
+ // NB: cdir_view_item is *not* processed by the rest of the compiler; the
65
+ // attached view_items are sunk into the crate's module during parsing,
66
+ // and processed (resolved, imported, etc.) there. This tag-variant exists
67
+ // only to preserve the view items in order in case we decide to
68
+ // pretty-print crates in the future.
63
69
cdir_view_item ( @view_item) ;
70
+
64
71
cdir_syntax ( @path) ;
65
72
}
66
73
You can’t perform that action at this time.
0 commit comments