Skip to content

Commit 8746ebe

Browse files
committed
Add some changes that *should* have been in e98286b
Forgot to amend the commit after fixing the failure.
1 parent 2ac6380 commit 8746ebe

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/comp/middle/resolve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,17 @@ fn map_crate(e: @env, c: @ast::crate) {
217217
let imp = follow_import(*e, sc, path, vi.span);
218218
if option::is_some(imp) {
219219
let glob = {def: option::get(imp), item: vi};;
220-
alt sc {
221-
cons(scope_item(i), _) {
220+
alt list::head(sc) {
221+
scope_item(i) {
222222
e.mod_map.get(i.id).glob_imports += [glob];
223223
}
224-
cons(scope_block(b, _, _), _) {
224+
scope_block(b, _, _) {
225225
let globs = alt e.block_map.find(b.node.id) {
226226
some(globs) { globs + [glob] } none. { [glob] }
227227
};
228228
e.block_map.insert(b.node.id, globs);
229229
}
230-
nil. {
230+
scope_crate. {
231231
e.mod_map.get(-1).glob_imports += [glob];
232232
}
233233
}

src/comp/syntax/print/pprust.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ fn print_possibly_embedded_block(s: ps, blk: ast::blk, embedded: embed_type,
562562
block_normal. { bopen(s); }
563563
}
564564

565+
for vi in blk.node.view_items { print_view_item(s, vi); }
565566
for st: @ast::stmt in blk.node.stmts {
566567
print_stmt(s, *st);
567568
}

0 commit comments

Comments
 (0)