about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_middle/src/ty/layout.rs2
-rw-r--r--compiler/rustc_trait_selection/src/traits/query/normalize.rs1
-rw-r--r--src/test/compile-fail/consts/issue-55878.rs2
-rw-r--r--src/test/ui/huge-array-simple-32.stderr2
-rw-r--r--src/test/ui/huge-array-simple-64.stderr2
-rw-r--r--src/test/ui/huge-array.rs2
-rw-r--r--src/test/ui/huge-array.stderr2
-rw-r--r--src/test/ui/huge-enum.rs2
-rw-r--r--src/test/ui/huge-enum.stderr2
-rw-r--r--src/test/ui/huge-struct.rs2
-rw-r--r--src/test/ui/huge-struct.stderr2
-rw-r--r--src/test/ui/issues/issue-15919-32.stderr2
-rw-r--r--src/test/ui/issues/issue-15919-64.stderr2
-rw-r--r--src/test/ui/issues/issue-17913.stderr2
-rw-r--r--src/test/ui/issues/issue-56762.rs4
-rw-r--r--src/test/ui/issues/issue-56762.stderr4
-rw-r--r--src/test/ui/layout/big-type-no-err.rs13
-rw-r--r--src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs2
-rw-r--r--src/test/ui/lint/issue-69485-var-size-diffs-too-large.stderr2
19 files changed, 33 insertions, 19 deletions
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
index acc7d3c4960..5626c864fe1 100644
--- a/compiler/rustc_middle/src/ty/layout.rs
+++ b/compiler/rustc_middle/src/ty/layout.rs
@@ -176,7 +176,7 @@ impl<'tcx> fmt::Display for LayoutError<'tcx> {
         match *self {
             LayoutError::Unknown(ty) => write!(f, "the type `{}` has an unknown layout", ty),
             LayoutError::SizeOverflow(ty) => {
-                write!(f, "the type `{}` is too big for the current architecture", ty)
+                write!(f, "values of the type `{}` are too big for the current architecture", ty)
             }
         }
     }
diff --git a/compiler/rustc_trait_selection/src/traits/query/normalize.rs b/compiler/rustc_trait_selection/src/traits/query/normalize.rs
index 873d300a5e3..54743ef9ce9 100644
--- a/compiler/rustc_trait_selection/src/traits/query/normalize.rs
+++ b/compiler/rustc_trait_selection/src/traits/query/normalize.rs
@@ -97,6 +97,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
         self.infcx.tcx
     }
 
+    #[instrument(skip(self))]
     fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
         if !ty.has_projections() {
             return ty;
diff --git a/src/test/compile-fail/consts/issue-55878.rs b/src/test/compile-fail/consts/issue-55878.rs
index aa1dd58d246..541befa7b13 100644
--- a/src/test/compile-fail/consts/issue-55878.rs
+++ b/src/test/compile-fail/consts/issue-55878.rs
@@ -1,7 +1,7 @@
 // normalize-stderr-64bit "18446744073709551615" -> "SIZE"
 // normalize-stderr-32bit "4294967295" -> "SIZE"
 
-// error-pattern: is too big for the current architecture
+// error-pattern: are too big for the current architecture
 fn main() {
     println!("Size: {}", std::mem::size_of::<[u8; std::u64::MAX as usize]>());
 }
diff --git a/src/test/ui/huge-array-simple-32.stderr b/src/test/ui/huge-array-simple-32.stderr
index d734a9689e0..31e120df626 100644
--- a/src/test/ui/huge-array-simple-32.stderr
+++ b/src/test/ui/huge-array-simple-32.stderr
@@ -1,4 +1,4 @@
-error: the type `[u8; 2147516416]` is too big for the current architecture
+error: values of the type `[u8; 2147516416]` are too big for the current architecture
   --> $DIR/huge-array-simple-32.rs:10:9
    |
 LL |     let _fat: [u8; (1<<31)+(1<<15)] =
diff --git a/src/test/ui/huge-array-simple-64.stderr b/src/test/ui/huge-array-simple-64.stderr
index 791baa84687..c5d3fe85d0d 100644
--- a/src/test/ui/huge-array-simple-64.stderr
+++ b/src/test/ui/huge-array-simple-64.stderr
@@ -1,4 +1,4 @@
-error: the type `[u8; 2305843011361177600]` is too big for the current architecture
+error: values of the type `[u8; 2305843011361177600]` are too big for the current architecture
   --> $DIR/huge-array-simple-64.rs:10:9
    |
 LL |     let _fat: [u8; (1<<61)+(1<<31)] =
diff --git a/src/test/ui/huge-array.rs b/src/test/ui/huge-array.rs
index 846380586a0..3070801f865 100644
--- a/src/test/ui/huge-array.rs
+++ b/src/test/ui/huge-array.rs
@@ -6,7 +6,7 @@
 
 fn generic<T: Copy>(t: T) {
     let s: [T; 1518600000] = [t; 1518600000];
-    //~^ ERROR the type `[[u8; 1518599999]; 1518600000]` is too big for the current architecture
+    //~^ ERROR values of the type `[[u8; 1518599999]; 1518600000]` are too big
 }
 
 fn main() {
diff --git a/src/test/ui/huge-array.stderr b/src/test/ui/huge-array.stderr
index 23d9e87ae00..817458b73e4 100644
--- a/src/test/ui/huge-array.stderr
+++ b/src/test/ui/huge-array.stderr
@@ -1,4 +1,4 @@
-error: the type `[[u8; 1518599999]; 1518600000]` is too big for the current architecture
+error: values of the type `[[u8; 1518599999]; 1518600000]` are too big for the current architecture
   --> $DIR/huge-array.rs:8:9
    |
 LL |     let s: [T; 1518600000] = [t; 1518600000];
diff --git a/src/test/ui/huge-enum.rs b/src/test/ui/huge-enum.rs
index 8a713c3a26e..39ea6e11b1f 100644
--- a/src/test/ui/huge-enum.rs
+++ b/src/test/ui/huge-enum.rs
@@ -14,5 +14,5 @@ type BIG = Option<[u32; (1<<45)-1]>;
 
 fn main() {
     let big: BIG = None;
-    //~^ ERROR is too big for the current architecture
+    //~^ ERROR are too big for the current architecture
 }
diff --git a/src/test/ui/huge-enum.stderr b/src/test/ui/huge-enum.stderr
index a069c37b80a..a1456e1a8ab 100644
--- a/src/test/ui/huge-enum.stderr
+++ b/src/test/ui/huge-enum.stderr
@@ -1,4 +1,4 @@
-error: the type `Option<TYPE>` is too big for the current architecture
+error: values of the type `Option<TYPE>` are too big for the current architecture
   --> $DIR/huge-enum.rs:16:9
    |
 LL |     let big: BIG = None;
diff --git a/src/test/ui/huge-struct.rs b/src/test/ui/huge-struct.rs
index 71169a11047..02f38d860b4 100644
--- a/src/test/ui/huge-struct.rs
+++ b/src/test/ui/huge-struct.rs
@@ -48,6 +48,6 @@ struct S1M<T> { val: S1k<S1k<T>> }
 
 fn main() {
     let fat: Option<S1M<S1M<S1M<u32>>>> = None;
-    //~^ ERROR is too big for the current architecture
+    //~^ ERROR are too big for the current architecture
 
 }
diff --git a/src/test/ui/huge-struct.stderr b/src/test/ui/huge-struct.stderr
index 72e32a8593b..f0ee88e5955 100644
--- a/src/test/ui/huge-struct.stderr
+++ b/src/test/ui/huge-struct.stderr
@@ -1,4 +1,4 @@
-error: the type `SXX<SXX<SXX<u32>>>` is too big for the current architecture
+error: values of the type `SXX<SXX<SXX<u32>>>` are too big for the current architecture
   --> $DIR/huge-struct.rs:50:9
    |
 LL |     let fat: Option<SXX<SXX<SXX<u32>>>> = None;
diff --git a/src/test/ui/issues/issue-15919-32.stderr b/src/test/ui/issues/issue-15919-32.stderr
index 8411313fc81..133637f9a05 100644
--- a/src/test/ui/issues/issue-15919-32.stderr
+++ b/src/test/ui/issues/issue-15919-32.stderr
@@ -1,4 +1,4 @@
-error: the type `[usize; 4294967295]` is too big for the current architecture
+error: values of the type `[usize; 4294967295]` are too big for the current architecture
   --> $DIR/issue-15919-32.rs:9:9
    |
 LL |     let x = [0usize; 0xffff_ffff];
diff --git a/src/test/ui/issues/issue-15919-64.stderr b/src/test/ui/issues/issue-15919-64.stderr
index f624c96ce84..193b823035c 100644
--- a/src/test/ui/issues/issue-15919-64.stderr
+++ b/src/test/ui/issues/issue-15919-64.stderr
@@ -1,4 +1,4 @@
-error: the type `[usize; 18446744073709551615]` is too big for the current architecture
+error: values of the type `[usize; 18446744073709551615]` are too big for the current architecture
   --> $DIR/issue-15919-64.rs:9:9
    |
 LL |     let x = [0usize; 0xffff_ffff_ffff_ffff];
diff --git a/src/test/ui/issues/issue-17913.stderr b/src/test/ui/issues/issue-17913.stderr
index ae388c4d491..9a6431d4470 100644
--- a/src/test/ui/issues/issue-17913.stderr
+++ b/src/test/ui/issues/issue-17913.stderr
@@ -1,4 +1,4 @@
-error: the type `[&usize; N]` is too big for the current architecture
+error: values of the type `[&usize; N]` are too big for the current architecture
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-56762.rs b/src/test/ui/issues/issue-56762.rs
index 5ba5b9847d0..fb0a270f18b 100644
--- a/src/test/ui/issues/issue-56762.rs
+++ b/src/test/ui/issues/issue-56762.rs
@@ -17,8 +17,8 @@ impl TooBigArray {
 }
 
 static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
-//~^ ERROR the type `[u8; 2305843009213693951]` is too big for the current architecture
+//~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
 static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
-//~^ ERROR the type `[u8; 2305843009213693951]` is too big for the current architecture
+//~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
 
 fn main() { }
diff --git a/src/test/ui/issues/issue-56762.stderr b/src/test/ui/issues/issue-56762.stderr
index 69626d4bc7a..f26ef280b20 100644
--- a/src/test/ui/issues/issue-56762.stderr
+++ b/src/test/ui/issues/issue-56762.stderr
@@ -1,10 +1,10 @@
-error[E0080]: the type `[u8; 2305843009213693951]` is too big for the current architecture
+error[E0080]: values of the type `[u8; 2305843009213693951]` are too big for the current architecture
   --> $DIR/issue-56762.rs:19:1
    |
 LL | static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0080]: the type `[u8; 2305843009213693951]` is too big for the current architecture
+error[E0080]: values of the type `[u8; 2305843009213693951]` are too big for the current architecture
   --> $DIR/issue-56762.rs:21:1
    |
 LL | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
diff --git a/src/test/ui/layout/big-type-no-err.rs b/src/test/ui/layout/big-type-no-err.rs
new file mode 100644
index 00000000000..af8191a9cb9
--- /dev/null
+++ b/src/test/ui/layout/big-type-no-err.rs
@@ -0,0 +1,13 @@
+// Enormous types are allowed if they are never actually instantiated.
+// run-pass
+trait Foo {
+    type Assoc;
+}
+
+impl Foo for [u16; usize::MAX] {
+    type Assoc = u32;
+}
+
+fn main() {
+    let _a: Option<<[u16; usize::MAX] as Foo>::Assoc> = None;
+}
diff --git a/src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs b/src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs
index 0895f4c18e3..2560ffe168b 100644
--- a/src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs
+++ b/src/test/ui/lint/issue-69485-var-size-diffs-too-large.rs
@@ -3,7 +3,7 @@
 // compile-flags: -Zmir-opt-level=0
 
 fn main() {
-    Bug::V([0; !0]); //~ ERROR is too big for the current
+    Bug::V([0; !0]); //~ ERROR are too big for the current
 }
 
 enum Bug {
diff --git a/src/test/ui/lint/issue-69485-var-size-diffs-too-large.stderr b/src/test/ui/lint/issue-69485-var-size-diffs-too-large.stderr
index 51eac95afb9..c229458da47 100644
--- a/src/test/ui/lint/issue-69485-var-size-diffs-too-large.stderr
+++ b/src/test/ui/lint/issue-69485-var-size-diffs-too-large.stderr
@@ -1,4 +1,4 @@
-error: the type `[u8; 18446744073709551615]` is too big for the current architecture
+error: values of the type `[u8; 18446744073709551615]` are too big for the current architecture
   --> $DIR/issue-69485-var-size-diffs-too-large.rs:6:12
    |
 LL |     Bug::V([0; !0]);