]> git.lizzy.rs Git - rust.git/commitdiff
warning → error, lowercase
authorAndre Bogus <bogusandre@gmail.com>
Thu, 8 Sep 2016 05:26:55 +0000 (07:26 +0200)
committerAndre Bogus <bogusandre@gmail.com>
Thu, 8 Sep 2016 05:26:55 +0000 (07:26 +0200)
src/librustc_typeck/rscope.rs
src/test/compile-fail/const-unsized.rs
src/test/compile-fail/issue-24446.rs

index 5b00a625bacf5b18a2a6e1385130e42b159158c9..be44dce8a8acadd55895d0b213d3d0a71ff33359 100644 (file)
@@ -243,9 +243,9 @@ fn base_object_lifetime_default(&self, span: Span) -> ty::Region {
         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
index 07d6edb1f3b15619b016b5a75fba5516d514be9e..d3c0bf0021350d402f5150bad4d811d32e591314 100644 (file)
@@ -15,7 +15,7 @@
 //~| 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 @@
 //~| 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
index d721c8bb6d2bfd654c0fca4fa6586a8a45e1713a..bcc1d3c3e42d9f4f3eddb3f21264f375452e6655 100644 (file)
@@ -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
     };
 }