Skip to content

Commit 88584d5

Browse files
committed
change error for LayoutErr::SizeOverflow
1 parent dcc194c commit 88584d5

18 files changed

+32
-19
lines changed

compiler/rustc_middle/src/ty/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl<'tcx> fmt::Display for LayoutError<'tcx> {
176176
match *self {
177177
LayoutError::Unknown(ty) => write!(f, "the type `{}` has an unknown layout", ty),
178178
LayoutError::SizeOverflow(ty) => {
179-
write!(f, "the type `{}` is too big for the current architecture", ty)
179+
write!(f, "values of the type `{}` are too big for the current architecture", ty)
180180
}
181181
}
182182
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// normalize-stderr-64bit "18446744073709551615" -> "SIZE"
22
// normalize-stderr-32bit "4294967295" -> "SIZE"
33

4-
// error-pattern: is too big for the current architecture
4+
// error-pattern: are too big for the current architecture
55
fn main() {
66
println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
77
}

src/test/ui/huge-array-simple-32.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `[u8; 2147516416]` is too big for the current architecture
1+
error: values of the type `[u8; 2147516416]` are too big for the current architecture
22
--> $DIR/huge-array-simple-32.rs:10:9
33
|
44
LL | let _fat: [u8; (1<<31)+(1<<15)] =

src/test/ui/huge-array-simple-64.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `[u8; 2305843011361177600]` is too big for the current architecture
1+
error: values of the type `[u8; 2305843011361177600]` are too big for the current architecture
22
--> $DIR/huge-array-simple-64.rs:10:9
33
|
44
LL | let _fat: [u8; (1<<61)+(1<<31)] =

src/test/ui/huge-array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
fn generic<T: Copy>(t: T) {
88
let s: [T; 1518600000] = [t; 1518600000];
9-
//~^ ERROR the type `[[u8; 1518599999]; 1518600000]` is too big for the current architecture
9+
//~^ ERROR values of the type `[[u8; 1518599999]; 1518600000]` are too big
1010
}
1111

1212
fn main() {

src/test/ui/huge-array.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `[[u8; 1518599999]; 1518600000]` is too big for the current architecture
1+
error: values of the type `[[u8; 1518599999]; 1518600000]` are too big for the current architecture
22
--> $DIR/huge-array.rs:8:9
33
|
44
LL | let s: [T; 1518600000] = [t; 1518600000];

src/test/ui/huge-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ type BIG = Option<[u32; (1<<45)-1]>;
1414

1515
fn main() {
1616
let big: BIG = None;
17-
//~^ ERROR is too big for the current architecture
17+
//~^ ERROR are too big for the current architecture
1818
}

src/test/ui/huge-enum.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `Option<TYPE>` is too big for the current architecture
1+
error: values of the type `Option<TYPE>` are too big for the current architecture
22
--> $DIR/huge-enum.rs:16:9
33
|
44
LL | let big: BIG = None;

src/test/ui/huge-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ struct S1M<T> { val: S1k<S1k<T>> }
4848

4949
fn main() {
5050
let fat: Option<S1M<S1M<S1M<u32>>>> = None;
51-
//~^ ERROR is too big for the current architecture
51+
//~^ ERROR are too big for the current architecture
5252

5353
}

src/test/ui/huge-struct.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: the type `SXX<SXX<SXX<u32>>>` is too big for the current architecture
1+
error: values of the type `SXX<SXX<SXX<u32>>>` are too big for the current architecture
22
--> $DIR/huge-struct.rs:50:9
33
|
44
LL | let fat: Option<SXX<SXX<SXX<u32>>>> = None;

0 commit comments

Comments
 (0)