Skip to content

Commit 27dd543

Browse files
committed
---
yaml --- r: 151109 b: refs/heads/try2 c: 6648651 h: refs/heads/master i: 151107: 4a10260 v: v3
1 parent d7c56fb commit 27dd543

File tree

6 files changed

+55
-5
lines changed

6 files changed

+55
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6328f7c199a1697aaee7e5fe2b397c457e6c311a
8+
refs/heads/try2: 66486518d5e1e4f0850024386b66a7aa790fc32f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/lint.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,9 @@ impl<'a> Visitor<()> for Context<'a> {
16381638
fn visit_view_item(&mut self, i: &ast::ViewItem, _: ()) {
16391639
self.with_lint_attrs(i.attrs.as_slice(), |cx| {
16401640
check_attrs_usage(cx, i.attrs.as_slice());
1641+
1642+
cx.visit_ids(|v| v.visit_view_item(i, ()));
1643+
16411644
visit::walk_view_item(cx, i, ());
16421645
})
16431646
}

branches/try2/src/libstd/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
// Don't link to std. We are std.
5858
#![no_std]
5959

60-
// NOTE: remove after snapshot
61-
#![allow(unknown_features)]
6260
#![deny(missing_doc)]
6361

6462
// When testing libstd, bring in libuv as the I/O backend so tests can print

branches/try2/src/libsyntax/ast_util.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -396,6 +396,13 @@ impl<'a, O: IdVisitingOperation> Visitor<()> for IdVisitor<'a, O> {
396396
}
397397

398398
fn visit_view_item(&mut self, view_item: &ViewItem, env: ()) {
399+
if !self.pass_through_items {
400+
if self.visited_outermost {
401+
return;
402+
} else {
403+
self.visited_outermost = true;
404+
}
405+
}
399406
match view_item.node {
400407
ViewItemExternCrate(_, _, node_id) => {
401408
self.operation.visit_id(node_id)
@@ -417,7 +424,8 @@ impl<'a, O: IdVisitingOperation> Visitor<()> for IdVisitor<'a, O> {
417424
}
418425
}
419426
}
420-
visit::walk_view_item(self, view_item, env)
427+
visit::walk_view_item(self, view_item, env);
428+
self.visited_outermost = false;
421429
}
422430

423431
fn visit_foreign_item(&mut self, foreign_item: &ForeignItem, env: ()) {

branches/try2/src/snapshots.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
S 2014-04-23 b5dd3f0
2+
freebsd-x86_64 b6ccb045b9bea4cc4781bc128e047a1c68dc2c17
3+
linux-i386 9e4e8d2bc70ff5b8db21169f762cb20c4dba6c2c
4+
linux-x86_64 3367b8e1a0295c8124c26c5c627343ebe9a0ac5d
5+
macos-i386 3029be6d6cc7a34b8a03a0a659b427c2916a8962
6+
macos-x86_64 2de6d89ac8063588a37059140a602f028f2cc2ea
7+
winnt-i386 021b39bc24b293f166aa329224f08cc5dedd5769
8+
19
S 2014-04-15 349d66a
210
freebsd-x86_64 0e8078e24b3f86481c5ae0a47a15e5ed2703f241
311
linux-i386 b4e5d104fc2b1eb0236b662ab3cbbb729f789bd6
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![deny(unused_imports)]
12+
13+
// The aim of this test is to ensure that deny/allow/warn directives
14+
// are applied to individual "use" statements instead of silently
15+
// ignored.
16+
17+
#[allow(dead_code)]
18+
mod a { pub static x: int = 3; pub static y: int = 4; }
19+
20+
mod b {
21+
use a::x; //~ ERROR: unused import
22+
#[allow(unused_imports)]
23+
use a::y; // no error here
24+
}
25+
26+
#[allow(unused_imports)]
27+
mod c {
28+
use a::x;
29+
#[deny(unused_imports)]
30+
use a::y; //~ ERROR: unused import
31+
}
32+
33+
fn main() {}

0 commit comments

Comments
 (0)