Skip to content

Commit bb1e1f7

Browse files
committed
---
yaml --- r: 234799 b: refs/heads/tmp c: 357982f h: refs/heads/master i: 234797: 409226f 234795: a7868c1 234791: 98acf06 234783: 09ef606 v: v3
1 parent 9507ec6 commit bb1e1f7

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 50e42ea9f70361ccd71682070c01ea808891f0ce
28+
refs/heads/tmp: 357982fae4ac7be0f6e0065399606f2d78618aaf
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/src/librustc_front/visit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
218218
visitor.visit_path_list_item(prefix, item)
219219
}
220220
} else {
221-
// FIXME: uncomment this and fix the resulting ICE
222-
// visitor.visit_path(prefix, item.id);
221+
// FIXME(#28388) visit_path should be used instead of walk_path
222+
walk_path(visitor, prefix);
223223
}
224224
}
225225
}

branches/tmp/src/librustc_privacy/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -980,15 +980,19 @@ impl<'a, 'tcx, 'v> Visitor<'v> for PrivacyVisitor<'a, 'tcx> {
980980
}
981981

982982
fn visit_path(&mut self, path: &hir::Path, id: ast::NodeId) {
983-
self.check_path(path.span, id, path.segments.last().unwrap().identifier.name);
984-
visit::walk_path(self, path);
983+
if !path.segments.is_empty() {
984+
self.check_path(path.span, id, path.segments.last().unwrap().identifier.name);
985+
visit::walk_path(self, path);
986+
}
985987
}
986988

987989
fn visit_path_list_item(&mut self, prefix: &hir::Path, item: &hir::PathListItem) {
988990
let name = if let hir::PathListIdent { name, .. } = item.node {
989991
name.name
990-
} else {
992+
} else if !prefix.segments.is_empty() {
991993
prefix.segments.last().unwrap().identifier.name
994+
} else {
995+
self.tcx.sess.bug("`self` import in an import list with empty prefix");
992996
};
993997
self.check_path(item.span, item.node.id(), name);
994998
visit::walk_path_list_item(self, prefix, item);

branches/tmp/src/libstd/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@
201201

202202
#![feature(alloc)]
203203
#![feature(allow_internal_unstable)]
204-
#![feature(arc_weak)]
205204
#![feature(associated_consts)]
206205
#![feature(borrow_state)]
207206
#![feature(box_syntax)]

branches/tmp/src/libsyntax/visit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
224224
visitor.visit_path_list_item(prefix, item)
225225
}
226226
} else {
227-
// FIXME: uncomment this and fix the resulting ICE
228-
// visitor.visit_path(prefix, item.id);
227+
// FIXME(#28388) visit_path should be used instead of walk_path
228+
walk_path(visitor, prefix);
229229
}
230230
}
231231
}

branches/tmp/src/test/compile-fail/issue-28075.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212

1313
#![allow(unused_imports)]
1414

15-
use std::thread::{catch_panic, sleep}; //~ ERROR use of unstable library feature 'catch_panic'
16-
//~^ ERROR use of unstable library feature 'thread_sleep'
15+
use std::thread::{catch_panic, ScopedKey}; //~ ERROR use of unstable library feature 'catch_panic'
16+
//~^ ERROR use of unstable library feature 'scoped_tls'
1717

1818
use std::rt::{self}; //~ ERROR use of unstable library feature 'rt'
19-
use std::rt::{};
2019

2120
fn main() {
2221
}

0 commit comments

Comments
 (0)