diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-06-09 21:39:15 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-06-09 21:42:57 -0700 |
| commit | b6cccb3d815ea37272bb7806aff5cee851f424f2 (patch) | |
| tree | c66a71154934d7836bb9f7d311fcad272520e51a /src/test | |
| parent | 9bcf9119d86d0484b48e7a5efb7aefee88e11134 (diff) | |
| download | rust-b6cccb3d815ea37272bb7806aff5cee851f424f2.tar.gz rust-b6cccb3d815ea37272bb7806aff5cee851f424f2.zip | |
Track the source of the type_target and value_target separately for ImportResolutions
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/lint-unused-import-tricky-names.rs | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/test/compile-fail/lint-unused-import-tricky-names.rs b/src/test/compile-fail/lint-unused-import-tricky-names.rs index e36b5572909..4b80c524715 100644 --- a/src/test/compile-fail/lint-unused-import-tricky-names.rs +++ b/src/test/compile-fail/lint-unused-import-tricky-names.rs @@ -11,19 +11,37 @@ #[deny(unused_imports)]; // Regression test for issue #6633 +mod issue6633 { + use self::foo::name::name; //~ ERROR: unused import + use self::foo::name; -use foo::name::name; //~ ERROR: unused import -use foo::name; - -pub mod foo { - pub mod name { - pub type a = int; + pub mod foo { pub mod name { - pub type a = float; + pub type a = int; + pub mod name { + pub type a = float; + } } } + + fn bar() -> name::a { 1 } } -fn bar() -> name::a { 1 } +// Regression test for issue #6935 +mod issue6935 { + use self::a::foo::a::foo; + use self::a::foo; //~ ERROR: unused import + + pub mod a { + pub mod foo { + pub mod a { + pub fn foo() {} + } + } + } + + fn bar() { foo(); } +} fn main(){} + |
