diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index 2fc2448dd0c14..da6e8936eed5d 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -447,7 +447,7 @@ pub fn raw_struct_lint<'a>(sess: &'a Session, if let Some(future_incompatible) = lints.future_incompatible(LintId::of(lint)) { let explanation = format!("this was previously accepted by the compiler \ but is being phased out, \ - and will become a HARD ERROR in a future release!"); + and will become a hard error in a future release!"); let citation = format!("for more information, see {}", future_incompatible.reference); if let Some(sp) = span { diff --git a/src/test/compile-fail/empty-struct-unit-pat.rs b/src/test/compile-fail/empty-struct-unit-pat.rs index d90e9c40ea42e..cffd9fd9b4938 100644 --- a/src/test/compile-fail/empty-struct-unit-pat.rs +++ b/src/test/compile-fail/empty-struct-unit-pat.rs @@ -32,7 +32,7 @@ fn main() { //~ ERROR: compilation successful // } match e1 { Empty1(..) => () //~ WARN `Empty1` does not name a tuple variant or a tuple struct - //~^ WARN HARD ERROR + //~^ WARN hard error } // Rejected by parser as yet // match e2 { @@ -40,6 +40,6 @@ fn main() { //~ ERROR: compilation successful // } match e2 { E::Empty2(..) => () //~ WARN `E::Empty2` does not name a tuple variant or a tuple struct - //~^ WARN HARD ERROR + //~^ WARN hard error } } diff --git a/src/test/compile-fail/private-in-public-warn.rs b/src/test/compile-fail/private-in-public-warn.rs index 3af6bad1d6161..9aab06ce14ee1 100644 --- a/src/test/compile-fail/private-in-public-warn.rs +++ b/src/test/compile-fail/private-in-public-warn.rs @@ -26,34 +26,34 @@ mod types { } pub type Alias = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub enum E { V1(Priv), //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error V2 { field: Priv }, //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } pub trait Tr { const C: Priv = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error type Alias = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error fn f1(arg: Priv) {} //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error fn f2() -> Priv { panic!() } //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } extern { pub static ES: Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub fn ef1(arg: Priv); //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub fn ef2() -> Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } impl PubTr for Pub { type Alias = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } } @@ -64,21 +64,21 @@ mod traits { pub type Alias = T; //~ WARN private trait in public interface //~^ WARN trait bounds are not (yet) enforced in type definitions - //~| WARNING HARD ERROR + //~| WARNING hard error pub trait Tr1: PrivTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr2 {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr3 { type Alias: PrivTr; //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error fn f(arg: T) {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } impl Pub {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error impl PubTr for Pub {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } mod traits_where { @@ -87,17 +87,17 @@ mod traits_where { pub trait PubTr {} pub type Alias where T: PrivTr = T; //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr2 where T: PrivTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr3 { fn f(arg: T) where T: PrivTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } impl Pub where T: PrivTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error impl PubTr for Pub where T: PrivTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } mod generics { @@ -107,13 +107,13 @@ mod generics { pub trait PubTr {} pub trait Tr1: PrivTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr2: PubTr {} //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr3: PubTr<[Priv; 1]> {} //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr4: PubTr> {} //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } mod impls { @@ -140,7 +140,7 @@ mod impls { } impl PubTr for Pub { type Alias = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } } @@ -207,11 +207,11 @@ mod aliases_pub { pub trait Tr1: PrivUseAliasTr {} // OK // This should be OK, if type aliases are substituted pub trait Tr2: PrivUseAliasTr {} //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error impl PrivAlias { pub fn f(arg: Priv) {} //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } // This doesn't even parse // impl ::AssocAlias { @@ -219,15 +219,15 @@ mod aliases_pub { // } impl PrivUseAliasTr for PrivUseAlias { type Check = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } impl PrivUseAliasTr for PrivAlias { type Check = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } impl PrivUseAliasTr for ::AssocAlias { type Check = Priv; //~ WARN private type in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error } } @@ -250,11 +250,11 @@ mod aliases_priv { impl PrivTr for Priv {} pub trait Tr1: PrivUseAliasTr {} //~ WARN private trait in public interface - //~^ WARNING HARD ERROR + //~^ WARNING hard error pub trait Tr2: PrivUseAliasTr {} //~ WARN private trait in public interface //~^ WARN private type in public interface - //~| WARNING HARD ERROR - //~| WARNING HARD ERROR + //~| WARNING hard error + //~| WARNING hard error impl PrivUseAlias { pub fn f(arg: Priv) {} // OK diff --git a/src/test/compile-fail/private-variant-reexport.rs b/src/test/compile-fail/private-variant-reexport.rs index 0e8f92de6589e..06f08dc13c6b4 100644 --- a/src/test/compile-fail/private-variant-reexport.rs +++ b/src/test/compile-fail/private-variant-reexport.rs @@ -13,22 +13,22 @@ mod m1 { pub use ::E::V; //~ WARN variant `V` is private, and cannot be reexported - //~^ WARNING HARD ERROR + //~^ WARNING hard error } mod m2 { pub use ::E::{V}; //~ WARN variant `V` is private, and cannot be reexported - //~^ WARNING HARD ERROR + //~^ WARNING hard error } mod m3 { pub use ::E::V::{self}; //~ WARN variant `V` is private, and cannot be reexported - //~^ WARNING HARD ERROR + //~^ WARNING hard error } mod m4 { pub use ::E::*; //~ WARN variant `V` is private, and cannot be reexported - //~^ WARNING HARD ERROR + //~^ WARNING hard error } enum E { V } diff --git a/src/test/compile-fail/type-parameter-invalid-lint.rs b/src/test/compile-fail/type-parameter-invalid-lint.rs index af97156a77134..9291329fac37f 100644 --- a/src/test/compile-fail/type-parameter-invalid-lint.rs +++ b/src/test/compile-fail/type-parameter-invalid-lint.rs @@ -13,5 +13,5 @@ fn avg(_: T) {} //~^ ERROR defaults for type parameters are only allowed -//~| WARNING HARD ERROR +//~| WARNING hard error fn main() {}