about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-29 22:23:44 -0400
committerMichael Goulet <michael@errs.io>2024-10-01 13:55:46 -0400
commit6628bba06083d8b182d1f526f53a4ed6f8203042 (patch)
treecc89c9acc622c890aa6f1c5be794631331c98dc6
parent40465d2449f3d9a36c86b94885f58ed3ee2a99f0 (diff)
downloadrust-6628bba06083d8b182d1f526f53a4ed6f8203042.tar.gz
rust-6628bba06083d8b182d1f526f53a4ed6f8203042.zip
Remove crashes and fix tests
-rw-r--r--src/tools/clippy/tests/ui/crashes/ice-12284.rs10
-rw-r--r--tests/crashes/117942.rs7
-rw-r--r--tests/crashes/121161.rs12
-rw-r--r--tests/crashes/121263-2.rs6
-rw-r--r--tests/crashes/121263.rs9
-rw-r--r--tests/crashes/121299.rs6
-rw-r--r--tests/crashes/121722.rs10
-rw-r--r--tests/crashes/121799.rs11
-rw-r--r--tests/crashes/126969.rs9
-rw-r--r--tests/mir-opt/unnamed-fields/field_access.bar.SimplifyCfg-initial.after.mir59
-rw-r--r--tests/mir-opt/unnamed-fields/field_access.foo.SimplifyCfg-initial.after.mir59
-rw-r--r--tests/mir-opt/unnamed-fields/field_access.rs73
-rw-r--r--tests/ui/unpretty/expanded-exhaustive.rs1
-rw-r--r--tests/ui/unpretty/expanded-exhaustive.stdout1
14 files changed, 0 insertions, 273 deletions
diff --git a/src/tools/clippy/tests/ui/crashes/ice-12284.rs b/src/tools/clippy/tests/ui/crashes/ice-12284.rs
deleted file mode 100644
index 8d1dbface8e..00000000000
--- a/src/tools/clippy/tests/ui/crashes/ice-12284.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-#[repr(C)]
-struct Foo {
-    _: struct {
-    },
-}
-
-fn main() {}
diff --git a/tests/crashes/117942.rs b/tests/crashes/117942.rs
deleted file mode 100644
index 6fdfc689250..00000000000
--- a/tests/crashes/117942.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-//@ known-bug: #117942
-struct Foo {
-    _: union  {
-    #[rustfmt::skip]
-    f: String
-    },
-}
diff --git a/tests/crashes/121161.rs b/tests/crashes/121161.rs
deleted file mode 100644
index 6da6426a86d..00000000000
--- a/tests/crashes/121161.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-//@ known-bug: #121161
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-
-#[derive(Eq)]
-#[repr(C)]
-struct Bar {
-    _: union {
-        a: u8,
-    },
-}
diff --git a/tests/crashes/121263-2.rs b/tests/crashes/121263-2.rs
deleted file mode 100644
index 2c6327a8808..00000000000
--- a/tests/crashes/121263-2.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-//@ known-bug: #121263
-#[repr(C)]
-#[derive(Debug)]
-struct L {
-    _: MyI32,
-}
diff --git a/tests/crashes/121263.rs b/tests/crashes/121263.rs
deleted file mode 100644
index cd7583a7faf..00000000000
--- a/tests/crashes/121263.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ known-bug: #121263
-#[repr(C)]
-#[repr(C)]
-#[derive(Debug)]
-struct L {
-    _: i32,
-    _: MyI32,
-    _: BadEnum,
-}
diff --git a/tests/crashes/121299.rs b/tests/crashes/121299.rs
deleted file mode 100644
index be5e0c0df57..00000000000
--- a/tests/crashes/121299.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-//@ known-bug: #121299
-#[derive(Eq)]
-struct D {
-    _: union {
-    },
-}
diff --git a/tests/crashes/121722.rs b/tests/crashes/121722.rs
deleted file mode 100644
index d1b8c447bf7..00000000000
--- a/tests/crashes/121722.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ known-bug: #121722
-#[repr(C)]
-struct Foo {
-    _: u8,
-}
-
-#[repr(C)]
-struct D {
-    _: Foo,
-}
diff --git a/tests/crashes/121799.rs b/tests/crashes/121799.rs
deleted file mode 100644
index 6035c9d9b15..00000000000
--- a/tests/crashes/121799.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ known-bug: #121799
-struct S {
-    _: str
-}
-
-fn func(a: S)
-{
-    let _x = a.f;
-}
-
-fn main() {}
diff --git a/tests/crashes/126969.rs b/tests/crashes/126969.rs
deleted file mode 100644
index 676563d059c..00000000000
--- a/tests/crashes/126969.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//@ known-bug: rust-lang/rust#126969
-
-struct S<T> {
-    _: union { t: T },
-}
-
-fn f(S::<&i8> { .. }: S<&i8>) {}
-
-fn main() {}
diff --git a/tests/mir-opt/unnamed-fields/field_access.bar.SimplifyCfg-initial.after.mir b/tests/mir-opt/unnamed-fields/field_access.bar.SimplifyCfg-initial.after.mir
deleted file mode 100644
index f1904e5d0f4..00000000000
--- a/tests/mir-opt/unnamed-fields/field_access.bar.SimplifyCfg-initial.after.mir
+++ /dev/null
@@ -1,59 +0,0 @@
-// MIR for `bar` after SimplifyCfg-initial
-
-fn bar(_1: Bar) -> () {
-    debug bar => _1;
-    let mut _0: ();
-    let _2: ();
-    let mut _3: u8;
-    let _4: ();
-    let mut _5: i8;
-    let _6: ();
-    let mut _7: bool;
-    let _8: ();
-    let mut _9: [u8; 1];
-
-    bb0: {
-        StorageLive(_2);
-        StorageLive(_3);
-        _3 = copy (_1.0: u8);
-        _2 = access::<u8>(move _3) -> [return: bb1, unwind: bb5];
-    }
-
-    bb1: {
-        StorageDead(_3);
-        StorageDead(_2);
-        StorageLive(_4);
-        StorageLive(_5);
-        _5 = copy ((_1.1: Bar::{anon_adt#0}).0: i8);
-        _4 = access::<i8>(move _5) -> [return: bb2, unwind: bb5];
-    }
-
-    bb2: {
-        StorageDead(_5);
-        StorageDead(_4);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = copy ((_1.1: Bar::{anon_adt#0}).1: bool);
-        _6 = access::<bool>(move _7) -> [return: bb3, unwind: bb5];
-    }
-
-    bb3: {
-        StorageDead(_7);
-        StorageDead(_6);
-        StorageLive(_8);
-        StorageLive(_9);
-        _9 = copy (((_1.2: Bar::{anon_adt#1}).0: Bar::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
-        _8 = access::<[u8; 1]>(move _9) -> [return: bb4, unwind: bb5];
-    }
-
-    bb4: {
-        StorageDead(_9);
-        StorageDead(_8);
-        _0 = const ();
-        return;
-    }
-
-    bb5 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/unnamed-fields/field_access.foo.SimplifyCfg-initial.after.mir b/tests/mir-opt/unnamed-fields/field_access.foo.SimplifyCfg-initial.after.mir
deleted file mode 100644
index c279f590012..00000000000
--- a/tests/mir-opt/unnamed-fields/field_access.foo.SimplifyCfg-initial.after.mir
+++ /dev/null
@@ -1,59 +0,0 @@
-// MIR for `foo` after SimplifyCfg-initial
-
-fn foo(_1: Foo) -> () {
-    debug foo => _1;
-    let mut _0: ();
-    let _2: ();
-    let mut _3: u8;
-    let _4: ();
-    let mut _5: i8;
-    let _6: ();
-    let mut _7: bool;
-    let _8: ();
-    let mut _9: [u8; 1];
-
-    bb0: {
-        StorageLive(_2);
-        StorageLive(_3);
-        _3 = copy (_1.0: u8);
-        _2 = access::<u8>(move _3) -> [return: bb1, unwind: bb5];
-    }
-
-    bb1: {
-        StorageDead(_3);
-        StorageDead(_2);
-        StorageLive(_4);
-        StorageLive(_5);
-        _5 = copy ((_1.1: Foo::{anon_adt#0}).0: i8);
-        _4 = access::<i8>(move _5) -> [return: bb2, unwind: bb5];
-    }
-
-    bb2: {
-        StorageDead(_5);
-        StorageDead(_4);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = copy ((_1.1: Foo::{anon_adt#0}).1: bool);
-        _6 = access::<bool>(move _7) -> [return: bb3, unwind: bb5];
-    }
-
-    bb3: {
-        StorageDead(_7);
-        StorageDead(_6);
-        StorageLive(_8);
-        StorageLive(_9);
-        _9 = copy (((_1.2: Foo::{anon_adt#1}).0: Foo::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
-        _8 = access::<[u8; 1]>(move _9) -> [return: bb4, unwind: bb5];
-    }
-
-    bb4: {
-        StorageDead(_9);
-        StorageDead(_8);
-        _0 = const ();
-        return;
-    }
-
-    bb5 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/unnamed-fields/field_access.rs b/tests/mir-opt/unnamed-fields/field_access.rs
deleted file mode 100644
index cc0ac9a3427..00000000000
--- a/tests/mir-opt/unnamed-fields/field_access.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-// Tests the correct handling of unnamed fields within structs and unions marked with #[repr(C)].
-
-// EMIT_MIR field_access.foo.SimplifyCfg-initial.after.mir
-// EMIT_MIR field_access.bar.SimplifyCfg-initial.after.mir
-
-#![allow(incomplete_features)]
-#![feature(unnamed_fields)]
-
-#[repr(C)]
-struct Foo {
-    a: u8,
-    _: struct {
-        b: i8,
-        c: bool,
-    },
-    _: struct {
-        _: struct {
-            d: [u8; 1],
-        }
-    },
-}
-
-#[repr(C)]
-union Bar {
-    a: u8,
-    _: union {
-        b: i8,
-        c: bool,
-    },
-    _: union {
-        _: union {
-            d: [u8; 1],
-        }
-    },
-}
-
-fn access<T>(_: T) {}
-
-// CHECK-LABEL: fn foo(
-fn foo(foo: Foo) {
-    // CHECK [[a:_.*]] = (_1.0: u8);
-    // CHECK _.* = access::<u8>(move [[a]]) -> [return: bb1, unwind: bb5];
-    access(foo.a);
-    // CHECK [[b:_.*]] = ((_1.1: Foo::{anon_adt#0}).0: i8);
-    // CHECK _.* = access::<i8>(move [[b]]) -> [return: bb2, unwind: bb5];
-    access(foo.b);
-    // CHECK [[c:_.*]] = ((_1.1: Foo::{anon_adt#0}).1: bool);
-    // CHECK _.* = access::<bool>(move [[c]]) -> [return: bb3, unwind: bb5];
-    access(foo.c);
-    // CHECK [[d:_.*]] = (((_1.2: Foo::{anon_adt#1}).0: Foo::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
-    // CHECK _.* = access::<[u8; 1]>(move [[d]]) -> [return: bb4, unwind: bb5];
-    access(foo.d);
-}
-
-// CHECK-LABEL: fn bar(
-fn bar(bar: Bar) {
-    unsafe {
-        // CHECK [[a:_.*]] = (_1.0: u8);
-        // CHECK _.* = access::<u8>(move [[a]]) -> [return: bb1, unwind: bb5];
-        access(bar.a);
-        // CHECK [[b:_.*]] = ((_1.1: Bar::{anon_adt#0}).0: i8);
-        // CHECK _.* = access::<i8>(move [[b]]) -> [return: bb2, unwind: bb5];
-        access(bar.b);
-        // CHECK [[c:_.*]] = ((_1.1: Bar::{anon_adt#0}).1: bool);
-        // CHECK _.* = access::<bool>(move [[c]]) -> [return: bb3, unwind: bb5];
-        access(bar.c);
-        // CHECK [[d:_.*]] = (((_1.2: Bar::{anon_adt#1}).0: Bar::{anon_adt#1}::{anon_adt#0}).0: [u8; 1]);
-        // CHECK _.* = access::<[u8; 1]>(move [[d]]) -> [return: bb4, unwind: bb5];
-        access(bar.d);
-    }
-}
-
-fn main() {}
diff --git a/tests/ui/unpretty/expanded-exhaustive.rs b/tests/ui/unpretty/expanded-exhaustive.rs
index b287e48e476..799e8071d02 100644
--- a/tests/ui/unpretty/expanded-exhaustive.rs
+++ b/tests/ui/unpretty/expanded-exhaustive.rs
@@ -23,7 +23,6 @@
 #![feature(trace_macros)]
 #![feature(trait_alias)]
 #![feature(try_blocks)]
-#![feature(unnamed_fields)]
 #![feature(yeet_expr)]
 #![allow(incomplete_features)]
 
diff --git a/tests/ui/unpretty/expanded-exhaustive.stdout b/tests/ui/unpretty/expanded-exhaustive.stdout
index f8d09650d92..d8384951e12 100644
--- a/tests/ui/unpretty/expanded-exhaustive.stdout
+++ b/tests/ui/unpretty/expanded-exhaustive.stdout
@@ -24,7 +24,6 @@
 #![feature(trace_macros)]
 #![feature(trait_alias)]
 #![feature(try_blocks)]
-#![feature(unnamed_fields)]
 #![feature(yeet_expr)]
 #![allow(incomplete_features)]
 #[prelude_import]