]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/private-variant-reexport.rs
one-time diagnostic and suggestion for reƫxporting private variant error
[rust.git] / src / test / compile-fail / private-variant-reexport.rs
index 06f08dc13c6b484ed2684904133954a128413d84..1280aba3076abbb3654f79619cbeadff461c64a2 100644 (file)
@@ -8,30 +8,22 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-
 mod m1 {
-    pub use ::E::V; //~ WARN variant `V` is private, and cannot be reexported
-    //~^ WARNING hard error
+    pub use ::E::V; //~ ERROR variant `V` is private and cannot be reexported
 }
 
 mod m2 {
-    pub use ::E::{V}; //~ WARN variant `V` is private, and cannot be reexported
-    //~^ WARNING hard error
+    pub use ::E::{V}; //~ ERROR variant `V` is private and cannot be reexported
 }
 
 mod m3 {
-    pub use ::E::V::{self}; //~ WARN variant `V` is private, and cannot be reexported
-    //~^ WARNING hard error
+    pub use ::E::V::{self}; //~ ERROR variant `V` is private and cannot be reexported
 }
 
 mod m4 {
-    pub use ::E::*; //~ WARN variant `V` is private, and cannot be reexported
-    //~^ WARNING hard error
+    pub use ::E::*; //~ ERROR enum is private and its variants cannot be reexported
 }
 
 enum E { V }
 
-#[rustc_error]
-fn main() {} //~ ERROR compilation successful
+fn main() {}