// 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() {}