about summary refs log tree commit diff
path: root/src/test/ui/limits
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/limits
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/limits')
-rw-r--r--src/test/ui/limits/huge-array-simple-32.rs12
-rw-r--r--src/test/ui/limits/huge-array-simple-32.stderr8
-rw-r--r--src/test/ui/limits/huge-array-simple-64.rs12
-rw-r--r--src/test/ui/limits/huge-array-simple-64.stderr8
-rw-r--r--src/test/ui/limits/huge-array.rs15
-rw-r--r--src/test/ui/limits/huge-array.stderr8
-rw-r--r--src/test/ui/limits/huge-enum.rs18
-rw-r--r--src/test/ui/limits/huge-enum.stderr8
-rw-r--r--src/test/ui/limits/huge-struct.rs53
-rw-r--r--src/test/ui/limits/huge-struct.stderr8
-rw-r--r--src/test/ui/limits/issue-15919-32.rs13
-rw-r--r--src/test/ui/limits/issue-15919-32.stderr8
-rw-r--r--src/test/ui/limits/issue-15919-64.rs13
-rw-r--r--src/test/ui/limits/issue-15919-64.stderr8
-rw-r--r--src/test/ui/limits/issue-17913.rs21
-rw-r--r--src/test/ui/limits/issue-17913.stderr4
-rw-r--r--src/test/ui/limits/issue-55878.rs8
-rw-r--r--src/test/ui/limits/issue-55878.stderr38
-rw-r--r--src/test/ui/limits/issue-56762.rs24
-rw-r--r--src/test/ui/limits/issue-56762.stderr15
-rw-r--r--src/test/ui/limits/issue-69485-var-size-diffs-too-large.rs11
-rw-r--r--src/test/ui/limits/issue-69485-var-size-diffs-too-large.stderr8
-rw-r--r--src/test/ui/limits/issue-75158-64.rs16
-rw-r--r--src/test/ui/limits/issue-75158-64.stderr4
24 files changed, 0 insertions, 341 deletions
diff --git a/src/test/ui/limits/huge-array-simple-32.rs b/src/test/ui/limits/huge-array-simple-32.rs
deleted file mode 100644
index 2290e3d5e76..00000000000
--- a/src/test/ui/limits/huge-array-simple-32.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// ignore-64bit
-// build-fail
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-#![allow(arithmetic_overflow)]
-
-fn main() {
-    let _fat: [u8; (1<<31)+(1<<15)] = //~ ERROR too big for the current architecture
-        [0; (1u32<<31) as usize +(1u32<<15) as usize];
-}
diff --git a/src/test/ui/limits/huge-array-simple-32.stderr b/src/test/ui/limits/huge-array-simple-32.stderr
deleted file mode 100644
index 31e120df626..00000000000
--- a/src/test/ui/limits/huge-array-simple-32.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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)] =
-   |         ^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/huge-array-simple-64.rs b/src/test/ui/limits/huge-array-simple-64.rs
deleted file mode 100644
index 02c961fc5fa..00000000000
--- a/src/test/ui/limits/huge-array-simple-64.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// build-fail
-// ignore-32bit
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-#![allow(arithmetic_overflow)]
-
-fn main() {
-    let _fat: [u8; (1<<61)+(1<<31)] = //~ ERROR too big for the current architecture
-        [0; (1u64<<61) as usize +(1u64<<31) as usize];
-}
diff --git a/src/test/ui/limits/huge-array-simple-64.stderr b/src/test/ui/limits/huge-array-simple-64.stderr
deleted file mode 100644
index c5d3fe85d0d..00000000000
--- a/src/test/ui/limits/huge-array-simple-64.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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)] =
-   |         ^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/huge-array.rs b/src/test/ui/limits/huge-array.rs
deleted file mode 100644
index 3070801f865..00000000000
--- a/src/test/ui/limits/huge-array.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// FIXME https://github.com/rust-lang/rust/issues/59774
-
-// build-fail
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-
-fn generic<T: Copy>(t: T) {
-    let s: [T; 1518600000] = [t; 1518600000];
-    //~^ ERROR values of the type `[[u8; 1518599999]; 1518600000]` are too big
-}
-
-fn main() {
-    let x: [u8; 1518599999] = [0; 1518599999];
-    generic::<[u8; 1518599999]>(x);
-}
diff --git a/src/test/ui/limits/huge-array.stderr b/src/test/ui/limits/huge-array.stderr
deleted file mode 100644
index 817458b73e4..00000000000
--- a/src/test/ui/limits/huge-array.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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];
-   |         ^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/huge-enum.rs b/src/test/ui/limits/huge-enum.rs
deleted file mode 100644
index 39ea6e11b1f..00000000000
--- a/src/test/ui/limits/huge-enum.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// build-fail
-// normalize-stderr-test "std::option::Option<\[u32; \d+\]>" -> "TYPE"
-// normalize-stderr-test "\[u32; \d+\]" -> "TYPE"
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-
-#[cfg(target_pointer_width = "32")]
-type BIG = Option<[u32; (1<<29)-1]>;
-
-#[cfg(target_pointer_width = "64")]
-type BIG = Option<[u32; (1<<45)-1]>;
-
-fn main() {
-    let big: BIG = None;
-    //~^ ERROR are too big for the current architecture
-}
diff --git a/src/test/ui/limits/huge-enum.stderr b/src/test/ui/limits/huge-enum.stderr
deleted file mode 100644
index a1456e1a8ab..00000000000
--- a/src/test/ui/limits/huge-enum.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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;
-   |         ^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/huge-struct.rs b/src/test/ui/limits/huge-struct.rs
deleted file mode 100644
index 02f38d860b4..00000000000
--- a/src/test/ui/limits/huge-struct.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// build-fail
-// normalize-stderr-test "S32" -> "SXX"
-// normalize-stderr-test "S1M" -> "SXX"
-// error-pattern: too big for the current
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-
-struct S32<T> {
-    v0: T,
-    v1: T,
-    v2: T,
-    v3: T,
-    v4: T,
-    v5: T,
-    v6: T,
-    v7: T,
-    v8: T,
-    u9: T,
-    v10: T,
-    v11: T,
-    v12: T,
-    v13: T,
-    v14: T,
-    v15: T,
-    v16: T,
-    v17: T,
-    v18: T,
-    v19: T,
-    v20: T,
-    v21: T,
-    v22: T,
-    v23: T,
-    v24: T,
-    u25: T,
-    v26: T,
-    v27: T,
-    v28: T,
-    v29: T,
-    v30: T,
-    v31: T,
-}
-
-struct S1k<T> { val: S32<S32<T>> }
-
-struct S1M<T> { val: S1k<S1k<T>> }
-
-fn main() {
-    let fat: Option<S1M<S1M<S1M<u32>>>> = None;
-    //~^ ERROR are too big for the current architecture
-
-}
diff --git a/src/test/ui/limits/huge-struct.stderr b/src/test/ui/limits/huge-struct.stderr
deleted file mode 100644
index f0ee88e5955..00000000000
--- a/src/test/ui/limits/huge-struct.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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;
-   |         ^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/issue-15919-32.rs b/src/test/ui/limits/issue-15919-32.rs
deleted file mode 100644
index 3c93f14ccc7..00000000000
--- a/src/test/ui/limits/issue-15919-32.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// ignore-64bit
-// build-fail
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-
-fn main() {
-    let x = [0usize; 0xffff_ffff]; //~ ERROR too big
-}
-
-// This and the -64 version of this test need to have different literals, as we can't rely on
-// conditional compilation for them while retaining the same spans/lines.
diff --git a/src/test/ui/limits/issue-15919-32.stderr b/src/test/ui/limits/issue-15919-32.stderr
deleted file mode 100644
index 133637f9a05..00000000000
--- a/src/test/ui/limits/issue-15919-32.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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];
-   |         ^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/issue-15919-64.rs b/src/test/ui/limits/issue-15919-64.rs
deleted file mode 100644
index 3ecbd34eaaa..00000000000
--- a/src/test/ui/limits/issue-15919-64.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// build-fail
-// ignore-32bit
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-
-fn main() {
-    let x = [0usize; 0xffff_ffff_ffff_ffff]; //~ ERROR too big
-}
-
-// This and the -32 version of this test need to have different literals, as we can't rely on
-// conditional compilation for them while retaining the same spans/lines.
diff --git a/src/test/ui/limits/issue-15919-64.stderr b/src/test/ui/limits/issue-15919-64.stderr
deleted file mode 100644
index 193b823035c..00000000000
--- a/src/test/ui/limits/issue-15919-64.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-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];
-   |         ^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/issue-17913.rs b/src/test/ui/limits/issue-17913.rs
deleted file mode 100644
index 8d4cbe20184..00000000000
--- a/src/test/ui/limits/issue-17913.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// build-fail
-// normalize-stderr-test "\[&usize; \d+\]" -> "[&usize; N]"
-// error-pattern: too big for the current architecture
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-
-#[cfg(target_pointer_width = "64")]
-fn main() {
-    let n = 0_usize;
-    let a: Box<_> = Box::new([&n; 0xF000000000000000_usize]);
-    println!("{}", a[0xFFFFFF_usize]);
-}
-
-#[cfg(target_pointer_width = "32")]
-fn main() {
-    let n = 0_usize;
-    let a: Box<_> = Box::new([&n; 0xFFFFFFFF_usize]);
-    println!("{}", a[0xFFFFFF_usize]);
-}
diff --git a/src/test/ui/limits/issue-17913.stderr b/src/test/ui/limits/issue-17913.stderr
deleted file mode 100644
index 9a6431d4470..00000000000
--- a/src/test/ui/limits/issue-17913.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-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/limits/issue-55878.rs b/src/test/ui/limits/issue-55878.rs
deleted file mode 100644
index c1c54646db8..00000000000
--- a/src/test/ui/limits/issue-55878.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// build-fail
-// normalize-stderr-64bit "18446744073709551615" -> "SIZE"
-// normalize-stderr-32bit "4294967295" -> "SIZE"
-
-// error-pattern: are too big for the current architecture
-fn main() {
-    println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-}
diff --git a/src/test/ui/limits/issue-55878.stderr b/src/test/ui/limits/issue-55878.stderr
deleted file mode 100644
index f455dcb06f7..00000000000
--- a/src/test/ui/limits/issue-55878.stderr
+++ /dev/null
@@ -1,38 +0,0 @@
-error[E0080]: values of the type `[u8; SIZE]` are too big for the current architecture
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-   |
-note: inside `std::mem::size_of::<[u8; SIZE]>`
-  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
-note: inside `main`
-  --> $DIR/issue-55878.rs:7:26
-   |
-LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-note: erroneous constant used
-  --> $DIR/issue-55878.rs:7:26
-   |
-LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-note: erroneous constant used
-  --> $DIR/issue-55878.rs:7:26
-   |
-LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-note: erroneous constant used
-  --> $DIR/issue-55878.rs:7:26
-   |
-LL |     println!("Size: {}", std::mem::size_of::<[u8; u64::MAX as usize]>());
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/limits/issue-56762.rs b/src/test/ui/limits/issue-56762.rs
deleted file mode 100644
index fb0a270f18b..00000000000
--- a/src/test/ui/limits/issue-56762.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// only-x86_64
-
-// FIXME https://github.com/rust-lang/rust/issues/59774
-// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-const HUGE_SIZE: usize = !0usize / 8;
-
-
-pub struct TooBigArray {
-    arr: [u8; HUGE_SIZE],
-}
-
-impl TooBigArray {
-    pub const fn new() -> Self {
-        TooBigArray { arr: [0x00; HUGE_SIZE], }
-    }
-}
-
-static MY_TOO_BIG_ARRAY_1: TooBigArray = TooBigArray::new();
-//~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
-static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE];
-//~^ ERROR values of the type `[u8; 2305843009213693951]` are too big
-
-fn main() { }
diff --git a/src/test/ui/limits/issue-56762.stderr b/src/test/ui/limits/issue-56762.stderr
deleted file mode 100644
index e6b9c676278..00000000000
--- a/src/test/ui/limits/issue-56762.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-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]: 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];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/limits/issue-69485-var-size-diffs-too-large.rs b/src/test/ui/limits/issue-69485-var-size-diffs-too-large.rs
deleted file mode 100644
index 2560ffe168b..00000000000
--- a/src/test/ui/limits/issue-69485-var-size-diffs-too-large.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// build-fail
-// only-x86_64
-// compile-flags: -Zmir-opt-level=0
-
-fn main() {
-    Bug::V([0; !0]); //~ ERROR are too big for the current
-}
-
-enum Bug {
-    V([u8; !0]),
-}
diff --git a/src/test/ui/limits/issue-69485-var-size-diffs-too-large.stderr b/src/test/ui/limits/issue-69485-var-size-diffs-too-large.stderr
deleted file mode 100644
index f7923bd4743..00000000000
--- a/src/test/ui/limits/issue-69485-var-size-diffs-too-large.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: values of the type `[u8; 18446744073709551615]` are too big for the current architecture
-  --> $DIR/issue-69485-var-size-diffs-too-large.rs:6:5
-   |
-LL |     Bug::V([0; !0]);
-   |     ^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/limits/issue-75158-64.rs b/src/test/ui/limits/issue-75158-64.rs
deleted file mode 100644
index 06c209c078f..00000000000
--- a/src/test/ui/limits/issue-75158-64.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//~ ERROR
-
-// build-fail
-// ignore-32bit
-
-struct S<T> {
-    x: [T; !0],
-}
-
-pub fn f() -> usize {
-    std::mem::size_of::<S<u8>>()
-}
-
-fn main() {
-    let x = f();
-}
diff --git a/src/test/ui/limits/issue-75158-64.stderr b/src/test/ui/limits/issue-75158-64.stderr
deleted file mode 100644
index dc11d056154..00000000000
--- a/src/test/ui/limits/issue-75158-64.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: values of the type `[u8; 18446744073709551615]` are too big for the current architecture
-
-error: aborting due to previous error
-