diff options
| author | bors <bors@rust-lang.org> | 2014-08-30 12:41:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-30 12:41:22 +0000 |
| commit | cbacdbc5f3bc4f401a96177df8efd2eb765e8799 (patch) | |
| tree | 3fbb3f862a421b6793ec3b99a1510a25ce71e6f9 /src/test | |
| parent | d398eb76ae5fdb7c08bbb7c0e3d85dc22d42c5ce (diff) | |
| parent | 6bbec28ea0193b09dbdfc2669b94ec7603506d21 (diff) | |
| download | rust-cbacdbc5f3bc4f401a96177df8efd2eb765e8799.tar.gz rust-cbacdbc5f3bc4f401a96177df8efd2eb765e8799.zip | |
auto merge of #16598 : bkoropoff/rust/import-shadow-name, r=alexcrichton
This partially alleviates the confusing behavior in issue #16597
Diffstat (limited to 'src/test')
3 files changed, 20 insertions, 2 deletions
diff --git a/src/test/compile-fail/resolve-conflict-import-vs-extern-crate.rs b/src/test/compile-fail/resolve-conflict-import-vs-extern-crate.rs index d13503b23fb..f27b11d5411 100644 --- a/src/test/compile-fail/resolve-conflict-import-vs-extern-crate.rs +++ b/src/test/compile-fail/resolve-conflict-import-vs-extern-crate.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::slice as std; //~ ERROR import conflicts with imported crate +use std::slice as std; //~ ERROR import `std` conflicts with imported crate fn main() { } diff --git a/src/test/compile-fail/resolve-conflict-item-vs-import.rs b/src/test/compile-fail/resolve-conflict-item-vs-import.rs index 3834007f5ff..96800918351 100644 --- a/src/test/compile-fail/resolve-conflict-item-vs-import.rs +++ b/src/test/compile-fail/resolve-conflict-item-vs-import.rs @@ -9,7 +9,7 @@ // except according to those terms. use std::mem::transmute; -//~^ ERROR import conflicts with value in this module +//~^ ERROR import `transmute` conflicts with value in this module fn transmute() {} diff --git a/src/test/compile-fail/resolve-conflict-type-vs-import.rs b/src/test/compile-fail/resolve-conflict-type-vs-import.rs new file mode 100644 index 00000000000..fa072fa62ab --- /dev/null +++ b/src/test/compile-fail/resolve-conflict-type-vs-import.rs @@ -0,0 +1,18 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::slice::Items; +//~^ ERROR import `Items` conflicts with type in this module + +struct Items; + +fn main() { +} + |
