Skip to content

Commit 41c26da

Browse files
TL note: current means target
1 parent 8431855 commit 41c26da

32 files changed

+40
-40
lines changed

compiler/rustc_hir_analysis/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ hir_analysis_tait_forward_compat2 = item does not constrain `{$opaque_type}`, bu
497497
498498
hir_analysis_target_feature_on_main = `main` function is not allowed to have `#[target_feature]`
499499
500-
hir_analysis_too_large_static = extern static is too large for the current architecture
500+
hir_analysis_too_large_static = extern static is too large for the target architecture
501501
502502
hir_analysis_track_caller_on_main = `main` function is not allowed to be `#[track_caller]`
503503
.suggestion = remove this annotation

compiler/rustc_hir_typeck/src/intrinsicck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
9595
format!("{v} bits")
9696
} else {
9797
// `u128` should definitely be able to hold the size of different architectures
98-
// larger sizes should be reported as error `are too big for the current architecture`
98+
// larger sizes should be reported as error `are too big for the target architecture`
9999
// otherwise we have a bug somewhere
100100
bug!("{:?} overflow for u128", size)
101101
}

compiler/rustc_middle/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ middle_unknown_layout =
103103
the type `{$ty}` has an unknown layout
104104
105105
middle_values_too_big =
106-
values of the type `{$ty}` are too big for the current architecture
106+
values of the type `{$ty}` are too big for the target architecture
107107
middle_written_to_path = the full type name has been written to '{$path}'

compiler/rustc_middle/src/ty/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<'tcx> fmt::Display for LayoutError<'tcx> {
264264
match *self {
265265
LayoutError::Unknown(ty) => write!(f, "the type `{ty}` has an unknown layout"),
266266
LayoutError::SizeOverflow(ty) => {
267-
write!(f, "values of the type `{ty}` are too big for the current architecture")
267+
write!(f, "values of the type `{ty}` are too big for the target architecture")
268268
}
269269
LayoutError::NormalizationFailure(t, e) => write!(
270270
f,

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2269,12 +2269,12 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
22692269
}
22702270
rustc_transmute::Reason::SrcSizeOverflow => {
22712271
format!(
2272-
"values of the type `{src}` are too big for the current architecture"
2272+
"values of the type `{src}` are too big for the target architecture"
22732273
)
22742274
}
22752275
rustc_transmute::Reason::DstSizeOverflow => {
22762276
format!(
2277-
"values of the type `{dst}` are too big for the current architecture"
2277+
"values of the type `{dst}` are too big for the target architecture"
22782278
)
22792279
}
22802280
rustc_transmute::Reason::DstHasStricterAlignment {

tests/ui/const-generics/transmute-fail.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-
3434
LL | std::mem::transmute(v)
3535
| ^^^^^^^^^^^^^^^^^^^
3636
|
37-
= note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type $REALLY_TOO_BIG are too big for the current architecture)
38-
= note: target type: `[[[u32; 9999999]; 777777777]; 8888888]` (values of the type $REALLY_TOO_BIG are too big for the current architecture)
37+
= note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
38+
= note: target type: `[[[u32; 9999999]; 777777777]; 8888888]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
3939

4040
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
4141
--> $DIR/transmute-fail.rs:40:14
4242
|
4343
LL | unsafe { std::mem::transmute(v) }
4444
| ^^^^^^^^^^^^^^^^^^^
4545
|
46-
= note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type $REALLY_TOO_BIG are too big for the current architecture)
47-
= note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type $REALLY_TOO_BIG are too big for the current architecture)
46+
= note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
47+
= note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
4848

4949
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
5050
--> $DIR/transmute-fail.rs:46:9

tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//@ compile-flags:-C debuginfo=2
55
//@ build-fail
6-
//@ error-pattern: too big for the current architecture
6+
//@ error-pattern: too big for the target architecture
77
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
88
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
99

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
1+
error: values of the type `[u8; usize::MAX]` are too big for the target architecture
22

33
error: aborting due to 1 previous error
44

tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
//@ compile-flags:-C debuginfo=2
77
//@ build-fail
8-
//@ error-pattern: too big for the current architecture
8+
//@ error-pattern: too big for the target architecture
99
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
1010
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
1111

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
1+
error: values of the type `[u8; usize::MAX]` are too big for the target architecture
22

33
error: aborting due to 1 previous error
44

tests/ui/extern/extern-static-size-overflow.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
error: extern static is too large for the current architecture
1+
error: extern static is too large for the target architecture
22
--> $DIR/extern-static-size-overflow.rs:20:5
33
|
44
LL | static BAZ: [u8; max_size()];
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
error: extern static is too large for the current architecture
7+
error: extern static is too large for the target architecture
88
--> $DIR/extern-static-size-overflow.rs:21:5
99
|
1010
LL | static UWU: [usize; usize::MAX];
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

13-
error: extern static is too large for the current architecture
13+
error: extern static is too large for the target architecture
1414
--> $DIR/extern-static-size-overflow.rs:22:5
1515
|
1616
LL | static A: ReallyBig;

tests/ui/layout/size-of-val-raw-too-big.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ build-fail
22
//@ compile-flags: --crate-type lib
33
//@ only-32bit Layout computation rejects this layout for different reasons on 64-bit.
4-
//@ error-pattern: too big for the current architecture
4+
//@ error-pattern: too big for the target architecture
55
#![feature(core_intrinsics)]
66
#![allow(internal_features)]
77

tests/ui/layout/too-big-with-padding.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#[repr(C, align(2))]
1111
pub struct Example([u8; 0x7fffffff]);
1212

13-
pub fn lib(_x: Example) {} //~ERROR: too big for the current architecture
13+
pub fn lib(_x: Example) {} //~ERROR: too big for the target architecture
1414

1515
#[lang = "sized"]
1616
pub trait Sized {}

tests/ui/layout/too-big-with-padding.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `Example` are too big for the current architecture
1+
error: values of the type `Example` are too big for the target architecture
22
--> $DIR/too-big-with-padding.rs:13:1
33
|
44
LL | pub fn lib(_x: Example) {}

tests/ui/limits/huge-array-simple-32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#![allow(arithmetic_overflow)]
55

66
fn main() {
7-
let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the current architecture
7+
let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the target architecture
88
[0; (1u32<<31) as usize +(1u32<<15) as usize];
99
}

tests/ui/limits/huge-array-simple-64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#![allow(arithmetic_overflow)]
55

66
fn main() {
7-
let _fat: [u8; (1<<61)+(1<<31)] = //~ ERROR too big for the current architecture
7+
let _fat: [u8; (1<<61)+(1<<31)] = //~ ERROR too big for the target architecture
88
[0; (1u64<<61) as usize +(1u64<<31) as usize];
99
}

tests/ui/limits/huge-array-simple-64.stderr

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

tests/ui/limits/huge-array.stderr

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

tests/ui/limits/huge-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ type BIG = Option<[u32; (1<<59)-1]>;
1010

1111
fn main() {
1212
let big: BIG = None;
13-
//~^ ERROR are too big for the current architecture
13+
//~^ ERROR are too big for the target architecture
1414
}

tests/ui/limits/huge-enum.stderr

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

tests/ui/limits/huge-static.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ error[E0080]: could not evaluate static initializer
22
--> $DIR/huge-static.rs:19:1
33
|
44
LL | static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the current architecture
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the target architecture
66

77
error[E0080]: could not evaluate static initializer
88
--> $DIR/huge-static.rs:22:1
99
|
1010
LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the current architecture
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ values of the type `[u8; 2305843009213693952]` are too big for the target architecture
1212

1313
error: aborting due to 2 previous errors
1414

tests/ui/limits/huge-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ struct S1M<T> { val: S1k<S1k<T>> }
4646

4747
fn main() {
4848
let fat: Option<S1M<S1M<S1M<u32>>>> = None;
49-
//~^ ERROR are too big for the current architecture
49+
//~^ ERROR are too big for the target architecture
5050

5151
}

tests/ui/limits/huge-struct.stderr

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

tests/ui/limits/issue-15919-64.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `[usize; usize::MAX]` are too big for the current architecture
1+
error: values of the type `[usize; usize::MAX]` are too big for the target architecture
22
--> $DIR/issue-15919-64.rs:5:9
33
|
44
LL | let x = [0usize; 0xffff_ffff_ffff_ffff];

tests/ui/limits/issue-17913.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ build-fail
22
//@ normalize-stderr-test: "\[&usize; \d+\]" -> "[&usize; usize::MAX]"
3-
//@ error-pattern: too big for the current architecture
3+
//@ error-pattern: too big for the target architecture
44

55
#[cfg(target_pointer_width = "64")]
66
fn main() {

tests/ui/limits/issue-17913.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `[&usize; usize::MAX]` are too big for the current architecture
1+
error: values of the type `[&usize; usize::MAX]` are too big for the target architecture
22
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
33

44
error: aborting due to 1 previous error

tests/ui/limits/issue-55878.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE"
33
//@ normalize-stderr-32bit: "4294967295" -> "SIZE"
44

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

tests/ui/limits/issue-55878.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0080]: evaluation of constant value failed
22
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
33
|
4-
= note: values of the type `[u8; usize::MAX]` are too big for the current architecture
4+
= note: values of the type `[u8; usize::MAX]` are too big for the target architecture
55
|
66
note: inside `std::mem::size_of::<[u8; usize::MAX]>`
77
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL

tests/ui/limits/issue-69485-var-size-diffs-too-large.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ compile-flags: -Zmir-opt-level=0
44

55
fn main() {
6-
Bug::V([0; !0]); //~ ERROR are too big for the current
6+
Bug::V([0; !0]); //~ ERROR are too big for the target
77
}
88

99
enum Bug {

tests/ui/limits/issue-69485-var-size-diffs-too-large.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
1+
error: values of the type `[u8; usize::MAX]` are too big for the target architecture
22
--> $DIR/issue-69485-var-size-diffs-too-large.rs:6:5
33
|
44
LL | Bug::V([0; !0]);

tests/ui/limits/issue-75158-64.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: values of the type `[u8; usize::MAX]` are too big for the current architecture
1+
error: values of the type `[u8; usize::MAX]` are too big for the target architecture
22

33
error: aborting due to 1 previous error
44

tests/ui/transmutability/arrays/huge-len.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0277]: `()` cannot be safely transmuted into `ExplicitlyPadded`
22
--> $DIR/huge-len.rs:21:41
33
|
44
LL | assert::is_maybe_transmutable::<(), ExplicitlyPadded>();
5-
| ^^^^^^^^^^^^^^^^ values of the type `ExplicitlyPadded` are too big for the current architecture
5+
| ^^^^^^^^^^^^^^^^ values of the type `ExplicitlyPadded` are too big for the target architecture
66
|
77
note: required by a bound in `is_maybe_transmutable`
88
--> $DIR/huge-len.rs:8:14
@@ -17,7 +17,7 @@ error[E0277]: `ExplicitlyPadded` cannot be safely transmuted into `()`
1717
--> $DIR/huge-len.rs:24:55
1818
|
1919
LL | assert::is_maybe_transmutable::<ExplicitlyPadded, ()>();
20-
| ^^ values of the type `ExplicitlyPadded` are too big for the current architecture
20+
| ^^ values of the type `ExplicitlyPadded` are too big for the target architecture
2121
|
2222
note: required by a bound in `is_maybe_transmutable`
2323
--> $DIR/huge-len.rs:8:14

0 commit comments

Comments
 (0)