]> git.lizzy.rs Git - rust.git/commitdiff
Fix fallout in tests.
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Thu, 13 Oct 2016 08:05:03 +0000 (08:05 +0000)
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Mon, 21 Nov 2016 09:21:54 +0000 (09:21 +0000)
27 files changed:
src/test/compile-fail/auxiliary/issue_12612_1.rs [deleted file]
src/test/compile-fail/auxiliary/namespace-mix-new.rs [deleted file]
src/test/compile-fail/auxiliary/namespace-mix-old.rs [deleted file]
src/test/compile-fail/auxiliary/namespace-mix.rs [new file with mode: 0644]
src/test/compile-fail/glob-cycles.rs
src/test/compile-fail/import-shadow-1.rs [deleted file]
src/test/compile-fail/import-shadow-2.rs [deleted file]
src/test/compile-fail/import-shadow-3.rs [deleted file]
src/test/compile-fail/import-shadow-4.rs [deleted file]
src/test/compile-fail/import-shadow-5.rs [deleted file]
src/test/compile-fail/import-shadow-6.rs [deleted file]
src/test/compile-fail/import-shadow-7.rs [deleted file]
src/test/compile-fail/import.rs
src/test/compile-fail/imports/duplicate.rs
src/test/compile-fail/imports/reexports.rs
src/test/compile-fail/imports/unused.rs
src/test/compile-fail/issue-12612.rs [deleted file]
src/test/compile-fail/issue-32797.rs
src/test/compile-fail/issue-32833.rs
src/test/compile-fail/namespace-mix-new.rs [deleted file]
src/test/compile-fail/namespace-mix-old.rs [deleted file]
src/test/compile-fail/namespace-mix.rs [new file with mode: 0644]
src/test/compile-fail/privacy2.rs
src/test/compile-fail/shadowed-use-visibility.rs
src/test/compile-fail/variant-namespacing.rs
src/test/run-pass-fulldeps/auxiliary/custom_derive_partial_eq.rs
src/test/run-pass/imports.rs

diff --git a/src/test/compile-fail/auxiliary/issue_12612_1.rs b/src/test/compile-fail/auxiliary/issue_12612_1.rs
deleted file mode 100644 (file)
index a0234c1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.
-
-pub mod bar {
-    pub fn foo() {}
-}
diff --git a/src/test/compile-fail/auxiliary/namespace-mix-new.rs b/src/test/compile-fail/auxiliary/namespace-mix-new.rs
deleted file mode 100644 (file)
index d42c0ee..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2016 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.
-
-#![feature(item_like_imports)]
-
-pub mod c {
-    pub struct S {}
-    pub struct TS();
-    pub struct US;
-    pub enum E {
-        V {},
-        TV(),
-        UV,
-    }
-
-    pub struct Item;
-}
-
-pub mod xm1 {
-    pub use ::c::*;
-    pub type S = ::c::Item;
-}
-pub mod xm2 {
-    pub use ::c::*;
-    pub const S: ::c::Item = ::c::Item;
-}
-
-pub mod xm3 {
-    pub use ::c::*;
-    pub type TS = ::c::Item;
-}
-pub mod xm4 {
-    pub use ::c::*;
-    pub const TS: ::c::Item = ::c::Item;
-}
-
-pub mod xm5 {
-    pub use ::c::*;
-    pub type US = ::c::Item;
-}
-pub mod xm6 {
-    pub use ::c::*;
-    pub const US: ::c::Item = ::c::Item;
-}
-
-pub mod xm7 {
-    pub use ::c::E::*;
-    pub type V = ::c::Item;
-}
-pub mod xm8 {
-    pub use ::c::E::*;
-    pub const V: ::c::Item = ::c::Item;
-}
-
-pub mod xm9 {
-    pub use ::c::E::*;
-    pub type TV = ::c::Item;
-}
-pub mod xmA {
-    pub use ::c::E::*;
-    pub const TV: ::c::Item = ::c::Item;
-}
-
-pub mod xmB {
-    pub use ::c::E::*;
-    pub type UV = ::c::Item;
-}
-pub mod xmC {
-    pub use ::c::E::*;
-    pub const UV: ::c::Item = ::c::Item;
-}
diff --git a/src/test/compile-fail/auxiliary/namespace-mix-old.rs b/src/test/compile-fail/auxiliary/namespace-mix-old.rs
deleted file mode 100644 (file)
index 29b139d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2016 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.
-
-// FIXME: Remove when `item_like_imports` is stabilized.
-
-pub mod c {
-    pub struct S {}
-    pub struct TS();
-    pub struct US;
-    pub enum E {
-        V {},
-        TV(),
-        UV,
-    }
-
-    pub struct Item;
-}
-
-pub mod proxy {
-    pub use c::*;
-    pub use c::E::*;
-}
-
-pub mod xm1 {
-    pub use ::proxy::*;
-    pub type S = ::c::Item;
-}
-pub mod xm2 {
-    pub use ::proxy::*;
-    pub const S: ::c::Item = ::c::Item;
-}
-
-pub mod xm3 {
-    pub use ::proxy::*;
-    pub type TS = ::c::Item;
-}
-pub mod xm4 {
-    pub use ::proxy::*;
-    pub const TS: ::c::Item = ::c::Item;
-}
-
-pub mod xm5 {
-    pub use ::proxy::*;
-    pub type US = ::c::Item;
-}
-pub mod xm6 {
-    pub use ::proxy::*;
-    pub const US: ::c::Item = ::c::Item;
-}
-
-pub mod xm7 {
-    pub use ::proxy::*;
-    pub type V = ::c::Item;
-}
-pub mod xm8 {
-    pub use ::proxy::*;
-    pub const V: ::c::Item = ::c::Item;
-}
-
-pub mod xm9 {
-    pub use ::proxy::*;
-    pub type TV = ::c::Item;
-}
-pub mod xmA {
-    pub use ::proxy::*;
-    pub const TV: ::c::Item = ::c::Item;
-}
-
-pub mod xmB {
-    pub use ::proxy::*;
-    pub type UV = ::c::Item;
-}
-pub mod xmC {
-    pub use ::proxy::*;
-    pub const UV: ::c::Item = ::c::Item;
-}
diff --git a/src/test/compile-fail/auxiliary/namespace-mix.rs b/src/test/compile-fail/auxiliary/namespace-mix.rs
new file mode 100644 (file)
index 0000000..d82e9bb
--- /dev/null
@@ -0,0 +1,76 @@
+// Copyright 2016 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.
+
+pub mod c {
+    pub struct S {}
+    pub struct TS();
+    pub struct US;
+    pub enum E {
+        V {},
+        TV(),
+        UV,
+    }
+
+    pub struct Item;
+}
+
+pub mod xm1 {
+    pub use ::c::*;
+    pub type S = ::c::Item;
+}
+pub mod xm2 {
+    pub use ::c::*;
+    pub const S: ::c::Item = ::c::Item;
+}
+
+pub mod xm3 {
+    pub use ::c::*;
+    pub type TS = ::c::Item;
+}
+pub mod xm4 {
+    pub use ::c::*;
+    pub const TS: ::c::Item = ::c::Item;
+}
+
+pub mod xm5 {
+    pub use ::c::*;
+    pub type US = ::c::Item;
+}
+pub mod xm6 {
+    pub use ::c::*;
+    pub const US: ::c::Item = ::c::Item;
+}
+
+pub mod xm7 {
+    pub use ::c::E::*;
+    pub type V = ::c::Item;
+}
+pub mod xm8 {
+    pub use ::c::E::*;
+    pub const V: ::c::Item = ::c::Item;
+}
+
+pub mod xm9 {
+    pub use ::c::E::*;
+    pub type TV = ::c::Item;
+}
+pub mod xmA {
+    pub use ::c::E::*;
+    pub const TV: ::c::Item = ::c::Item;
+}
+
+pub mod xmB {
+    pub use ::c::E::*;
+    pub type UV = ::c::Item;
+}
+pub mod xmC {
+    pub use ::c::E::*;
+    pub const UV: ::c::Item = ::c::Item;
+}
index 077ae19b4cbd6b71058cf3bb398be19e2b2dabb0..8f1b8ec91db38aafa4b79e74ebe7cbb89a71387e 100644 (file)
@@ -8,9 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(rustc_attrs)]
+
 mod foo {
     pub use bar::*;
-    pub use main as f; //~ ERROR has already been imported
+    pub use main as f;
 }
 
 mod bar {
@@ -18,9 +20,10 @@ mod bar {
 }
 
 pub use foo::*;
-pub use baz::*; //~ ERROR has already been imported
+pub use baz::*;
 mod baz {
     pub use super::*;
 }
 
-pub fn main() {}
+#[rustc_error]
+pub fn main() {} //~ ERROR compilation successful
diff --git a/src/test/compile-fail/import-shadow-1.rs b/src/test/compile-fail/import-shadow-1.rs
deleted file mode 100644 (file)
index 503fa4e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use foo::*;
-use bar::*; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/import-shadow-2.rs b/src/test/compile-fail/import-shadow-2.rs
deleted file mode 100644 (file)
index 0c107cf..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use foo::*;
-use foo::*; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/import-shadow-3.rs b/src/test/compile-fail/import-shadow-3.rs
deleted file mode 100644 (file)
index bf90973..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use foo::Baz;
-use bar::*; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/import-shadow-4.rs b/src/test/compile-fail/import-shadow-4.rs
deleted file mode 100644 (file)
index f21fdaa..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use foo::*;
-use bar::Baz; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/import-shadow-5.rs b/src/test/compile-fail/import-shadow-5.rs
deleted file mode 100644 (file)
index dc300bc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use foo::Baz;
-use bar::Baz; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/import-shadow-6.rs b/src/test/compile-fail/import-shadow-6.rs
deleted file mode 100644 (file)
index fa3b75c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use qux::*;
-use foo::*; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/import-shadow-7.rs b/src/test/compile-fail/import-shadow-7.rs
deleted file mode 100644 (file)
index 34aba15..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// Test that import shadowing using globs causes errors
-
-#![no_implicit_prelude]
-
-use foo::*;
-use qux::*; //~ERROR a type named `Baz` has already been imported in this module
-
-mod foo {
-    pub type Baz = isize;
-}
-
-mod bar {
-    pub type Baz = isize;
-}
-
-mod qux {
-    pub use bar::Baz;
-}
-
-fn main() {}
index 1ca1c060410adb1b44fecc132103d2fc78680000..81a5334ed7ab7675867ad8c184784b12d72095c6 100644 (file)
@@ -20,6 +20,6 @@ mod zed {
 }
 
 fn main() {
-    zed::foo(); //~ ERROR unresolved name
+    zed::foo(); //~ ERROR `foo` is private
     bar();
 }
index faf85a523e8fb01fdf33c6b00e45b3ff20fd1037..8dd69d8c24c855afc267e983199f09e1ed103675 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(item_like_imports)]
-
 mod a {
     pub fn foo() {}
 }
index fc46b23351adf071f8e5893c71285ad495340452..65e6e8d01b05f119c6bd6de43eb287c5ed4df57c 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(item_like_imports)]
-
 mod a {
     fn foo() {}
     mod foo {}
index 4ec9987df4208fb673b7b4a5c9f32cbf42b56960..05ecc781af30d53b22689e613d3ab4ca74eb8351 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(pub_restricted, item_like_imports)]
+#![feature(pub_restricted)]
 #![deny(unused)]
 
 mod foo {
diff --git a/src/test/compile-fail/issue-12612.rs b/src/test/compile-fail/issue-12612.rs
deleted file mode 100644 (file)
index c6f76ca..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.
-
-// aux-build:issue_12612_1.rs
-
-extern crate issue_12612_1 as foo;
-
-use foo::bar;
-
-mod test {
-    use bar::foo; //~ ERROR unresolved import `bar::foo` [E0432]
-                  //~^ Maybe a missing `extern crate bar;`?
-}
-
-fn main() {}
index af75783a710b53c2fc3d7f598e52b94462a599a3..2c54ed3e857e93130c5456b62fd54417b7214945 100644 (file)
@@ -8,14 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(rustc_attrs)]
+
 pub use bar::*;
 mod bar {
     pub use super::*;
 }
 
-pub use baz::*; //~ ERROR already been imported
+pub use baz::*;
 mod baz {
     pub use main as f;
 }
 
-pub fn main() {}
+#[rustc_error]
+pub fn main() {} //~ ERROR compilation successful
index d610e8b483798af81cf2c1df4a57f5054a925b72..41383e93603d36cd3b12921a95c3f774b9535900 100644 (file)
@@ -11,8 +11,7 @@
 use bar::Foo; //~ ERROR unresolved import `bar::Foo` [E0432]
               //~^ no `Foo` in `bar`
 mod bar {
-    use Foo; //~ ERROR unresolved import `Foo` [E0432]
-             //~^ no `Foo` in the root
+    use Foo;
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/namespace-mix-new.rs b/src/test/compile-fail/namespace-mix-new.rs
deleted file mode 100644 (file)
index 59592e3..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2016 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.
-
-// aux-build:namespace-mix-new.rs
-
-#![feature(item_like_imports)]
-
-extern crate namespace_mix_new;
-use namespace_mix_new::*;
-
-mod c {
-    pub struct S {}
-    pub struct TS();
-    pub struct US;
-    pub enum E {
-        V {},
-        TV(),
-        UV,
-    }
-
-    pub struct Item;
-}
-
-// Use something emitting the type argument name, e.g. unsatisfied bound.
-trait Impossible {}
-fn check<T: Impossible>(_: T) {}
-
-mod m1 {
-    pub use ::c::*;
-    pub type S = ::c::Item;
-}
-mod m2 {
-    pub use ::c::*;
-    pub const S: ::c::Item = ::c::Item;
-}
-
-fn f12() {
-    check(m1::S{}); //~ ERROR c::Item
-    check(m1::S); //~ ERROR unresolved name
-    check(m2::S{}); //~ ERROR c::S
-    check(m2::S); //~ ERROR c::Item
-}
-fn xf12() {
-    check(xm1::S{}); //~ ERROR c::Item
-    check(xm1::S); //~ ERROR unresolved name
-    check(xm2::S{}); //~ ERROR c::S
-    check(xm2::S); //~ ERROR c::Item
-}
-
-mod m3 {
-    pub use ::c::*;
-    pub type TS = ::c::Item;
-}
-mod m4 {
-    pub use ::c::*;
-    pub const TS: ::c::Item = ::c::Item;
-}
-
-fn f34() {
-    check(m3::TS{}); //~ ERROR c::Item
-    check(m3::TS); //~ ERROR c::TS
-    check(m4::TS{}); //~ ERROR c::TS
-    check(m4::TS); //~ ERROR c::Item
-}
-fn xf34() {
-    check(xm3::TS{}); //~ ERROR c::Item
-    check(xm3::TS); //~ ERROR c::TS
-    check(xm4::TS{}); //~ ERROR c::TS
-    check(xm4::TS); //~ ERROR c::Item
-}
-
-mod m5 {
-    pub use ::c::*;
-    pub type US = ::c::Item;
-}
-mod m6 {
-    pub use ::c::*;
-    pub const US: ::c::Item = ::c::Item;
-}
-
-fn f56() {
-    check(m5::US{}); //~ ERROR c::Item
-    check(m5::US); //~ ERROR c::US
-    check(m6::US{}); //~ ERROR c::US
-    check(m6::US); //~ ERROR c::Item
-}
-fn xf56() {
-    check(xm5::US{}); //~ ERROR c::Item
-    check(xm5::US); //~ ERROR c::US
-    check(xm6::US{}); //~ ERROR c::US
-    check(xm6::US); //~ ERROR c::Item
-}
-
-mod m7 {
-    pub use ::c::E::*;
-    pub type V = ::c::Item;
-}
-mod m8 {
-    pub use ::c::E::*;
-    pub const V: ::c::Item = ::c::Item;
-}
-
-fn f78() {
-    check(m7::V{}); //~ ERROR c::Item
-    check(m7::V); //~ ERROR name of a struct or struct variant
-    check(m8::V{}); //~ ERROR c::E
-    check(m8::V); //~ ERROR c::Item
-}
-fn xf78() {
-    check(xm7::V{}); //~ ERROR c::Item
-    check(xm7::V); //~ ERROR name of a struct or struct variant
-    check(xm8::V{}); //~ ERROR c::E
-    check(xm8::V); //~ ERROR c::Item
-}
-
-mod m9 {
-    pub use ::c::E::*;
-    pub type TV = ::c::Item;
-}
-mod mA {
-    pub use ::c::E::*;
-    pub const TV: ::c::Item = ::c::Item;
-}
-
-fn f9A() {
-    check(m9::TV{}); //~ ERROR c::Item
-    check(m9::TV); //~ ERROR c::E
-    check(mA::TV{}); //~ ERROR c::E
-    check(mA::TV); //~ ERROR c::Item
-}
-fn xf9A() {
-    check(xm9::TV{}); //~ ERROR c::Item
-    check(xm9::TV); //~ ERROR c::E
-    check(xmA::TV{}); //~ ERROR c::E
-    check(xmA::TV); //~ ERROR c::Item
-}
-
-mod mB {
-    pub use ::c::E::*;
-    pub type UV = ::c::Item;
-}
-mod mC {
-    pub use ::c::E::*;
-    pub const UV: ::c::Item = ::c::Item;
-}
-
-fn fBC() {
-    check(mB::UV{}); //~ ERROR c::Item
-    check(mB::UV); //~ ERROR c::E
-    check(mC::UV{}); //~ ERROR c::E
-    check(mC::UV); //~ ERROR c::Item
-}
-fn xfBC() {
-    check(xmB::UV{}); //~ ERROR c::Item
-    check(xmB::UV); //~ ERROR c::E
-    check(xmC::UV{}); //~ ERROR c::E
-    check(xmC::UV); //~ ERROR c::Item
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/namespace-mix-old.rs b/src/test/compile-fail/namespace-mix-old.rs
deleted file mode 100644 (file)
index 8cd8205..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2016 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.
-
-// FIXME: Remove when `item_like_imports` is stabilized.
-
-// aux-build:namespace-mix-old.rs
-
-extern crate namespace_mix_old;
-use namespace_mix_old::{xm1, xm2, xm3, xm4, xm5, xm6, xm7, xm8, xm9, xmA, xmB, xmC};
-
-mod c {
-    pub struct S {}
-    pub struct TS();
-    pub struct US;
-    pub enum E {
-        V {},
-        TV(),
-        UV,
-    }
-
-    pub struct Item;
-}
-
-mod proxy {
-    pub use c::*;
-    pub use c::E::*;
-}
-
-// Use something emitting the type argument name, e.g. unsatisfied bound.
-trait Impossible {}
-fn check<T: Impossible>(_: T) {}
-
-mod m1 {
-    pub use ::proxy::*;
-    pub type S = ::c::Item;
-}
-mod m2 {
-    pub use ::proxy::*;
-    pub const S: ::c::Item = ::c::Item;
-}
-
-fn f12() {
-    check(m1::S{}); //~ ERROR c::Item
-    check(m1::S); //~ ERROR unresolved name
-    check(m2::S{}); //~ ERROR c::S
-    check(m2::S); //~ ERROR c::Item
-}
-fn xf12() {
-    check(xm1::S{}); //~ ERROR c::Item
-    check(xm1::S); //~ ERROR unresolved name
-    check(xm2::S{}); //~ ERROR c::S
-    check(xm2::S); //~ ERROR c::Item
-}
-
-mod m3 {
-    pub use ::proxy::*;
-    pub type TS = ::c::Item;
-}
-mod m4 {
-    pub use ::proxy::*;
-    pub const TS: ::c::Item = ::c::Item;
-}
-
-fn f34() {
-    check(m3::TS{}); //~ ERROR c::Item
-    check(m3::TS); //~ ERROR c::TS
-    check(m4::TS{}); //~ ERROR c::TS
-    check(m4::TS); //~ ERROR c::Item
-}
-fn xf34() {
-    check(xm3::TS{}); //~ ERROR c::Item
-    check(xm3::TS); //~ ERROR c::TS
-    check(xm4::TS{}); //~ ERROR c::TS
-    check(xm4::TS); //~ ERROR c::Item
-}
-
-mod m5 {
-    pub use ::proxy::*;
-    pub type US = ::c::Item;
-}
-mod m6 {
-    pub use ::proxy::*;
-    pub const US: ::c::Item = ::c::Item;
-}
-
-fn f56() {
-    check(m5::US{}); //~ ERROR c::Item
-    check(m5::US); //~ ERROR c::US
-    check(m6::US{}); //~ ERROR c::US
-    check(m6::US); //~ ERROR c::Item
-}
-fn xf56() {
-    check(xm5::US{}); //~ ERROR c::Item
-    check(xm5::US); //~ ERROR c::US
-    check(xm6::US{}); //~ ERROR c::US
-    check(xm6::US); //~ ERROR c::Item
-}
-
-mod m7 {
-    pub use ::proxy::*;
-    pub type V = ::c::Item;
-}
-mod m8 {
-    pub use ::proxy::*;
-    pub const V: ::c::Item = ::c::Item;
-}
-
-fn f78() {
-    check(m7::V{}); //~ ERROR c::Item
-    check(m7::V); //~ ERROR name of a struct or struct variant
-    check(m8::V{}); //~ ERROR c::E
-    check(m8::V); //~ ERROR c::Item
-}
-fn xf78() {
-    check(xm7::V{}); //~ ERROR c::Item
-    check(xm7::V); //~ ERROR name of a struct or struct variant
-    check(xm8::V{}); //~ ERROR c::E
-    check(xm8::V); //~ ERROR c::Item
-}
-
-mod m9 {
-    pub use ::proxy::*;
-    pub type TV = ::c::Item;
-}
-mod mA {
-    pub use ::proxy::*;
-    pub const TV: ::c::Item = ::c::Item;
-}
-
-fn f9A() {
-    check(m9::TV{}); //~ ERROR c::Item
-    check(m9::TV); //~ ERROR c::E
-    check(mA::TV{}); //~ ERROR c::E
-    check(mA::TV); //~ ERROR c::Item
-}
-fn xf9A() {
-    check(xm9::TV{}); //~ ERROR c::Item
-    check(xm9::TV); //~ ERROR c::E
-    check(xmA::TV{}); //~ ERROR c::E
-    check(xmA::TV); //~ ERROR c::Item
-}
-
-mod mB {
-    pub use ::proxy::*;
-    pub type UV = ::c::Item;
-}
-mod mC {
-    pub use ::proxy::*;
-    pub const UV: ::c::Item = ::c::Item;
-}
-
-fn fBC() {
-    check(mB::UV{}); //~ ERROR c::Item
-    check(mB::UV); //~ ERROR c::E
-    check(mC::UV{}); //~ ERROR c::E
-    check(mC::UV); //~ ERROR c::Item
-}
-fn xfBC() {
-    check(xmB::UV{}); //~ ERROR c::Item
-    check(xmB::UV); //~ ERROR c::E
-    check(xmC::UV{}); //~ ERROR c::E
-    check(xmC::UV); //~ ERROR c::Item
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/namespace-mix.rs b/src/test/compile-fail/namespace-mix.rs
new file mode 100644 (file)
index 0000000..cb7894b
--- /dev/null
@@ -0,0 +1,165 @@
+// Copyright 2016 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.
+
+// aux-build:namespace-mix.rs
+
+extern crate namespace_mix;
+use namespace_mix::*;
+
+mod c {
+    pub struct S {}
+    pub struct TS();
+    pub struct US;
+    pub enum E {
+        V {},
+        TV(),
+        UV,
+    }
+
+    pub struct Item;
+}
+
+// Use something emitting the type argument name, e.g. unsatisfied bound.
+trait Impossible {}
+fn check<T: Impossible>(_: T) {}
+
+mod m1 {
+    pub use ::c::*;
+    pub type S = ::c::Item;
+}
+mod m2 {
+    pub use ::c::*;
+    pub const S: ::c::Item = ::c::Item;
+}
+
+fn f12() {
+    check(m1::S{}); //~ ERROR c::Item
+    check(m1::S); //~ ERROR unresolved name
+    check(m2::S{}); //~ ERROR c::S
+    check(m2::S); //~ ERROR c::Item
+}
+fn xf12() {
+    check(xm1::S{}); //~ ERROR c::Item
+    check(xm1::S); //~ ERROR unresolved name
+    check(xm2::S{}); //~ ERROR c::S
+    check(xm2::S); //~ ERROR c::Item
+}
+
+mod m3 {
+    pub use ::c::*;
+    pub type TS = ::c::Item;
+}
+mod m4 {
+    pub use ::c::*;
+    pub const TS: ::c::Item = ::c::Item;
+}
+
+fn f34() {
+    check(m3::TS{}); //~ ERROR c::Item
+    check(m3::TS); //~ ERROR c::TS
+    check(m4::TS{}); //~ ERROR c::TS
+    check(m4::TS); //~ ERROR c::Item
+}
+fn xf34() {
+    check(xm3::TS{}); //~ ERROR c::Item
+    check(xm3::TS); //~ ERROR c::TS
+    check(xm4::TS{}); //~ ERROR c::TS
+    check(xm4::TS); //~ ERROR c::Item
+}
+
+mod m5 {
+    pub use ::c::*;
+    pub type US = ::c::Item;
+}
+mod m6 {
+    pub use ::c::*;
+    pub const US: ::c::Item = ::c::Item;
+}
+
+fn f56() {
+    check(m5::US{}); //~ ERROR c::Item
+    check(m5::US); //~ ERROR c::US
+    check(m6::US{}); //~ ERROR c::US
+    check(m6::US); //~ ERROR c::Item
+}
+fn xf56() {
+    check(xm5::US{}); //~ ERROR c::Item
+    check(xm5::US); //~ ERROR c::US
+    check(xm6::US{}); //~ ERROR c::US
+    check(xm6::US); //~ ERROR c::Item
+}
+
+mod m7 {
+    pub use ::c::E::*;
+    pub type V = ::c::Item;
+}
+mod m8 {
+    pub use ::c::E::*;
+    pub const V: ::c::Item = ::c::Item;
+}
+
+fn f78() {
+    check(m7::V{}); //~ ERROR c::Item
+    check(m7::V); //~ ERROR name of a struct or struct variant
+    check(m8::V{}); //~ ERROR c::E
+    check(m8::V); //~ ERROR c::Item
+}
+fn xf78() {
+    check(xm7::V{}); //~ ERROR c::Item
+    check(xm7::V); //~ ERROR name of a struct or struct variant
+    check(xm8::V{}); //~ ERROR c::E
+    check(xm8::V); //~ ERROR c::Item
+}
+
+mod m9 {
+    pub use ::c::E::*;
+    pub type TV = ::c::Item;
+}
+mod mA {
+    pub use ::c::E::*;
+    pub const TV: ::c::Item = ::c::Item;
+}
+
+fn f9A() {
+    check(m9::TV{}); //~ ERROR c::Item
+    check(m9::TV); //~ ERROR c::E
+    check(mA::TV{}); //~ ERROR c::E
+    check(mA::TV); //~ ERROR c::Item
+}
+fn xf9A() {
+    check(xm9::TV{}); //~ ERROR c::Item
+    check(xm9::TV); //~ ERROR c::E
+    check(xmA::TV{}); //~ ERROR c::E
+    check(xmA::TV); //~ ERROR c::Item
+}
+
+mod mB {
+    pub use ::c::E::*;
+    pub type UV = ::c::Item;
+}
+mod mC {
+    pub use ::c::E::*;
+    pub const UV: ::c::Item = ::c::Item;
+}
+
+fn fBC() {
+    check(mB::UV{}); //~ ERROR c::Item
+    check(mB::UV); //~ ERROR c::E
+    check(mC::UV{}); //~ ERROR c::E
+    check(mC::UV); //~ ERROR c::Item
+}
+fn xfBC() {
+    check(xmB::UV{}); //~ ERROR c::Item
+    check(xmB::UV); //~ ERROR c::E
+    check(xmC::UV{}); //~ ERROR c::E
+    check(xmC::UV); //~ ERROR c::Item
+}
+
+fn main() {}
index 376e95312b8fbf6b1cc7df7034e1bf42cbae3edc..113dd2879406892e60fa0938d6e433b76393b258 100644 (file)
@@ -31,8 +31,7 @@ fn test1() {
 
 fn test2() {
     use bar::glob::foo;
-    //~^ ERROR unresolved import `bar::glob::foo` [E0432]
-    //~| no `foo` in `bar::glob`
+    //~^ ERROR `foo` is private
 }
 
 #[start] fn main(_: isize, _: *const *const u8) -> isize { 3 }
index 1bf7f3933849de76ba2307357ba574ebc776b90c..e7e57a73de02f7176fa6d6a8a70b77114489a29d 100644 (file)
@@ -16,11 +16,11 @@ pub fn f() {}
 }
 
 mod bar {
-    use foo::bar::f as g; //~ ERROR unresolved import
+    use foo::bar::f as g; //~ ERROR module `bar` is private
 
     use foo as f;
     pub use foo::*;
 }
 
-use bar::f::f; //~ ERROR unresolved import
+use bar::f::f; //~ ERROR module `f` is private
 fn main() {}
index 3d8e2daaa15b15616cb3d3e08bb7c460e0bce728..44e9260770e03ccfe83441c2b83b1dc32566310b 100644 (file)
@@ -31,11 +31,11 @@ enum E {
 const XUnit: u8 = 0;
 
 extern crate variant_namespacing;
-pub use variant_namespacing::XE::*;
+pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 //~^ ERROR `XStruct` has already been defined
 //~| ERROR `XTuple` has already been defined
 //~| ERROR `XUnit` has already been defined
-pub use E::*;
+pub use E::{Struct, Tuple, Unit};
 //~^ ERROR `Struct` has already been defined
 //~| ERROR `Tuple` has already been defined
 //~| ERROR `Unit` has already been defined
index e750d1fb1e3e6364dba8cf64655988c0a5a4bec5..4e402721a7b39383e2d08c1433bb82eb668aceca 100644 (file)
@@ -10,7 +10,7 @@
 
 // force-host
 
-#![feature(plugin_registrar, rustc_private, item_like_imports)]
+#![feature(plugin_registrar, rustc_private)]
 
 extern crate syntax;
 extern crate syntax_ext;
index 195b99c9788e893ccdf0ca67649df55ce3c6650b..f845a2ee571622b699ce35054b0480f63d14177d 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(item_like_imports)]
 #![allow(unused)]
 
 // Like other items, private imports can be imported and used non-lexically in paths.