about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndre Bogus <bogusandre@gmail.com>2016-09-08 07:26:55 +0200
committerAndre Bogus <bogusandre@gmail.com>2016-09-08 07:26:55 +0200
commite0eea8b7c1fbf2247694a94e216c239e0ec285b1 (patch)
tree4025581ba892a1e2b8e9c3a105b4b9d581a1aced
parent41d1cd7196d6799fa960ac220d20b958c1b797ed (diff)
downloadrust-e0eea8b7c1fbf2247694a94e216c239e0ec285b1.tar.gz
rust-e0eea8b7c1fbf2247694a94e216c239e0ec285b1.zip
warning → error, lowercase
-rw-r--r--src/librustc_typeck/rscope.rs6
-rw-r--r--src/test/compile-fail/const-unsized.rs4
-rw-r--r--src/test/compile-fail/issue-24446.rs2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_typeck/rscope.rs b/src/librustc_typeck/rscope.rs
index 5b00a625bac..be44dce8a8a 100644
--- a/src/librustc_typeck/rscope.rs
+++ b/src/librustc_typeck/rscope.rs
@@ -243,9 +243,9 @@ impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> RegionScope for StaticRscope<'a, 'gcx, 'tcx>
         if !self.tcx.sess.features.borrow().static_in_const {
             self.tcx
                 .sess
-                .struct_span_warn(span,
-                                  "This needs a `'static` lifetime or the \
-                                  `static_in_const` feature, see #35897")
+                .struct_span_err(span,
+                                 "this needs a `'static` lifetime or the \
+                                 `static_in_const` feature, see #35897")
                 .emit();
         }
         ty::ReStatic
diff --git a/src/test/compile-fail/const-unsized.rs b/src/test/compile-fail/const-unsized.rs
index 07d6edb1f3b..d3c0bf00213 100644
--- a/src/test/compile-fail/const-unsized.rs
+++ b/src/test/compile-fail/const-unsized.rs
@@ -15,7 +15,7 @@ const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
 //~| NOTE `std::fmt::Debug + Sync + 'static: std::marker::Sized` not satisfied
 //~| NOTE does not have a constant size known at compile-time
 //~| NOTE constant expressions must have a statically known size
-//~| WARNING This needs a `'static` lifetime or the `static_in_const` feature
+//~| ERROR this needs a `'static` lifetime or the `static_in_const` feature
 
 const CONST_FOO: str = *"foo";
 //~^ ERROR `str: std::marker::Sized` is not satisfied
@@ -28,7 +28,7 @@ static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
 //~| NOTE `std::fmt::Debug + Sync + 'static: std::marker::Sized` not satisfied
 //~| NOTE does not have a constant size known at compile-time
 //~| NOTE constant expressions must have a statically known size
-//~| WARNING This needs a `'static` lifetime or the `static_in_const` feature
+//~| ERROR this needs a `'static` lifetime or the `static_in_const` feature
 
 static STATIC_BAR: str = *"bar";
 //~^ ERROR `str: std::marker::Sized` is not satisfied
diff --git a/src/test/compile-fail/issue-24446.rs b/src/test/compile-fail/issue-24446.rs
index d721c8bb6d2..bcc1d3c3e42 100644
--- a/src/test/compile-fail/issue-24446.rs
+++ b/src/test/compile-fail/issue-24446.rs
@@ -12,7 +12,7 @@ fn main() {
     static foo: Fn() -> u32 = || -> u32 {
         //~^ ERROR: mismatched types
         //~| ERROR: `std::ops::Fn() -> u32 + 'static: std::marker::Sized` is not satisfied
-        //~| WARNING: This needs a `'static` lifetime or the `static_in_const` feature
+        //~| ERROR: this needs a `'static` lifetime or the `static_in_const` feature
         0
     };
 }