Skip to content

Commit c488202

Browse files
committed
---
yaml --- r: 232217 b: refs/heads/auto c: 357982f h: refs/heads/master i: 232215: fa65fe3 v: v3
1 parent 8bef819 commit c488202

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 50e42ea9f70361ccd71682070c01ea808891f0ce
11+
refs/heads/auto: 357982fae4ac7be0f6e0065399606f2d78618aaf
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/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/auto/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/auto/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/auto/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/auto/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)