Skip to content

Commit e0eea8b

Browse files
committed
warning → error, lowercase
1 parent 41d1cd7 commit e0eea8b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/librustc_typeck/rscope.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> RegionScope for StaticRscope<'a, 'gcx, 'tcx>
243243
if !self.tcx.sess.features.borrow().static_in_const {
244244
self.tcx
245245
.sess
246-
.struct_span_warn(span,
247-
"This needs a `'static` lifetime or the \
248-
`static_in_const` feature, see #35897")
246+
.struct_span_err(span,
247+
"this needs a `'static` lifetime or the \
248+
`static_in_const` feature, see #35897")
249249
.emit();
250250
}
251251
ty::ReStatic

src/test/compile-fail/const-unsized.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
1515
//~| NOTE `std::fmt::Debug + Sync + 'static: std::marker::Sized` not satisfied
1616
//~| NOTE does not have a constant size known at compile-time
1717
//~| NOTE constant expressions must have a statically known size
18-
//~| WARNING This needs a `'static` lifetime or the `static_in_const` feature
18+
//~| ERROR this needs a `'static` lifetime or the `static_in_const` feature
1919

2020
const CONST_FOO: str = *"foo";
2121
//~^ ERROR `str: std::marker::Sized` is not satisfied
@@ -28,7 +28,7 @@ static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
2828
//~| NOTE `std::fmt::Debug + Sync + 'static: std::marker::Sized` not satisfied
2929
//~| NOTE does not have a constant size known at compile-time
3030
//~| NOTE constant expressions must have a statically known size
31-
//~| WARNING This needs a `'static` lifetime or the `static_in_const` feature
31+
//~| ERROR this needs a `'static` lifetime or the `static_in_const` feature
3232

3333
static STATIC_BAR: str = *"bar";
3434
//~^ ERROR `str: std::marker::Sized` is not satisfied

src/test/compile-fail/issue-24446.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
static foo: Fn() -> u32 = || -> u32 {
1313
//~^ ERROR: mismatched types
1414
//~| ERROR: `std::ops::Fn() -> u32 + 'static: std::marker::Sized` is not satisfied
15-
//~| WARNING: This needs a `'static` lifetime or the `static_in_const` feature
15+
//~| ERROR: this needs a `'static` lifetime or the `static_in_const` feature
1616
0
1717
};
1818
}

0 commit comments

Comments
 (0)