about summary refs log tree commit diff
path: root/src/test/ui/inline-const
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/inline-const
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/inline-const')
-rw-r--r--src/test/ui/inline-const/const-expr-array-init.rs9
-rw-r--r--src/test/ui/inline-const/const-expr-basic.rs14
-rw-r--r--src/test/ui/inline-const/const-expr-generic-err.rs15
-rw-r--r--src/test/ui/inline-const/const-expr-generic-err.stderr29
-rw-r--r--src/test/ui/inline-const/const-expr-generic-err2.rs10
-rw-r--r--src/test/ui/inline-const/const-expr-generic-err2.stderr10
-rw-r--r--src/test/ui/inline-const/const-expr-generic.rs15
-rw-r--r--src/test/ui/inline-const/const-expr-inference.rs11
-rw-r--r--src/test/ui/inline-const/const-expr-lifetime-err.rs29
-rw-r--r--src/test/ui/inline-const/const-expr-lifetime-err.stderr18
-rw-r--r--src/test/ui/inline-const/const-expr-lifetime.rs35
-rw-r--r--src/test/ui/inline-const/const-expr-macro.rs12
-rw-r--r--src/test/ui/inline-const/const-expr-reference.rs14
-rw-r--r--src/test/ui/inline-const/const-match-pat-generic.rs31
-rw-r--r--src/test/ui/inline-const/const-match-pat-generic.stderr26
-rw-r--r--src/test/ui/inline-const/const-match-pat-inference.rs12
-rw-r--r--src/test/ui/inline-const/const-match-pat-lifetime-err.rs34
-rw-r--r--src/test/ui/inline-const/const-match-pat-lifetime.rs37
-rw-r--r--src/test/ui/inline-const/const-match-pat-range.rs39
-rw-r--r--src/test/ui/inline-const/const-match-pat.rs21
-rw-r--r--src/test/ui/inline-const/expr-unsafe-err.mir.stderr11
-rw-r--r--src/test/ui/inline-const/expr-unsafe-err.rs11
-rw-r--r--src/test/ui/inline-const/expr-unsafe-err.thir.stderr11
-rw-r--r--src/test/ui/inline-const/expr-unsafe.mir.stderr14
-rw-r--r--src/test/ui/inline-const/expr-unsafe.rs16
-rw-r--r--src/test/ui/inline-const/expr-unsafe.thir.stderr17
-rw-r--r--src/test/ui/inline-const/expr-with-block-err.rs6
-rw-r--r--src/test/ui/inline-const/expr-with-block-err.stderr9
-rw-r--r--src/test/ui/inline-const/expr-with-block.rs10
-rw-r--r--src/test/ui/inline-const/macro-with-const.rs20
-rw-r--r--src/test/ui/inline-const/pat-unsafe-err.rs17
-rw-r--r--src/test/ui/inline-const/pat-unsafe.rs22
32 files changed, 0 insertions, 585 deletions
diff --git a/src/test/ui/inline-const/const-expr-array-init.rs b/src/test/ui/inline-const/const-expr-array-init.rs
deleted file mode 100644
index 8a92cdbc0f9..00000000000
--- a/src/test/ui/inline-const/const-expr-array-init.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-pass
-
-#![feature(inline_const)]
-
-use std::cell::Cell;
-
-fn main() {
-    let _x = [const { Cell::new(0) }; 20];
-}
diff --git a/src/test/ui/inline-const/const-expr-basic.rs b/src/test/ui/inline-const/const-expr-basic.rs
deleted file mode 100644
index dac46fe25ec..00000000000
--- a/src/test/ui/inline-const/const-expr-basic.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// run-pass
-
-#![feature(inline_const)]
-
-fn foo() -> i32 {
-    const {
-        let x = 5 + 10;
-        x / 3
-    }
-}
-
-fn main() {
-    assert_eq!(5, foo());
-}
diff --git a/src/test/ui/inline-const/const-expr-generic-err.rs b/src/test/ui/inline-const/const-expr-generic-err.rs
deleted file mode 100644
index 4e8879af54a..00000000000
--- a/src/test/ui/inline-const/const-expr-generic-err.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// build-fail
-#![feature(inline_const)]
-
-fn foo<T>() {
-    const { assert!(std::mem::size_of::<T>() == 0); } //~ ERROR E0080
-}
-
-fn bar<const N: usize>() -> usize {
-    const { N - 1 } //~ ERROR E0080
-}
-
-fn main() {
-    foo::<i32>();
-    bar::<0>();
-}
diff --git a/src/test/ui/inline-const/const-expr-generic-err.stderr b/src/test/ui/inline-const/const-expr-generic-err.stderr
deleted file mode 100644
index fc0b6cc4451..00000000000
--- a/src/test/ui/inline-const/const-expr-generic-err.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0080]: evaluation of `foo::<i32>::{constant#0}` failed
-  --> $DIR/const-expr-generic-err.rs:5:13
-   |
-LL |     const { assert!(std::mem::size_of::<T>() == 0); }
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: std::mem::size_of::<T>() == 0', $DIR/const-expr-generic-err.rs:5:13
-   |
-   = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-note: the above error was encountered while instantiating `fn foo::<i32>`
-  --> $DIR/const-expr-generic-err.rs:13:5
-   |
-LL |     foo::<i32>();
-   |     ^^^^^^^^^^^^
-
-error[E0080]: evaluation of `bar::<0>::{constant#0}` failed
-  --> $DIR/const-expr-generic-err.rs:9:13
-   |
-LL |     const { N - 1 }
-   |             ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow
-
-note: the above error was encountered while instantiating `fn bar::<0>`
-  --> $DIR/const-expr-generic-err.rs:14:5
-   |
-LL |     bar::<0>();
-   |     ^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/src/test/ui/inline-const/const-expr-generic-err2.rs b/src/test/ui/inline-const/const-expr-generic-err2.rs
deleted file mode 100644
index e097cbe9dd6..00000000000
--- a/src/test/ui/inline-const/const-expr-generic-err2.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(inline_const)]
-
-fn foo<T>() {
-    let _ = [0u8; const { std::mem::size_of::<T>() }];
-    //~^ ERROR: constant expression depends on a generic parameter
-}
-
-fn main() {
-    foo::<i32>();
-}
diff --git a/src/test/ui/inline-const/const-expr-generic-err2.stderr b/src/test/ui/inline-const/const-expr-generic-err2.stderr
deleted file mode 100644
index 00b716cd259..00000000000
--- a/src/test/ui/inline-const/const-expr-generic-err2.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: constant expression depends on a generic parameter
-  --> $DIR/const-expr-generic-err2.rs:4:19
-   |
-LL |     let _ = [0u8; const { std::mem::size_of::<T>() }];
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this may fail depending on what value the parameter takes
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/inline-const/const-expr-generic.rs b/src/test/ui/inline-const/const-expr-generic.rs
deleted file mode 100644
index 3207bfa0e89..00000000000
--- a/src/test/ui/inline-const/const-expr-generic.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// check-pass
-#![feature(inline_const)]
-
-fn foo<T>() -> usize {
-    const { std::mem::size_of::<T>() }
-}
-
-fn bar<const N: usize>() -> usize {
-    const { N + 1 }
-}
-
-fn main() {
-    foo::<i32>();
-    bar::<1>();
-}
diff --git a/src/test/ui/inline-const/const-expr-inference.rs b/src/test/ui/inline-const/const-expr-inference.rs
deleted file mode 100644
index 0d5892a74d9..00000000000
--- a/src/test/ui/inline-const/const-expr-inference.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// check-pass
-
-#![feature(inline_const)]
-
-pub fn todo<T>() -> T {
-    const { todo!() }
-}
-
-fn main() {
-    let _: usize = const { 0 };
-}
diff --git a/src/test/ui/inline-const/const-expr-lifetime-err.rs b/src/test/ui/inline-const/const-expr-lifetime-err.rs
deleted file mode 100644
index 0a032a7338a..00000000000
--- a/src/test/ui/inline-const/const-expr-lifetime-err.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-#![feature(const_mut_refs)]
-#![feature(inline_const)]
-
-use std::marker::PhantomData;
-
-#[derive(PartialEq, Eq)]
-pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
-
-impl<'a, T: ?Sized> InvariantRef<'a, T> {
-    pub const fn new(r: &'a T) -> Self {
-        InvariantRef(r, PhantomData)
-    }
-}
-
-impl<'a> InvariantRef<'a, ()> {
-    pub const NEW: Self = InvariantRef::new(&());
-}
-
-fn equate<T>(x: T, y: T){}
-
-fn foo<'a>() {
-    let y = ();
-    equate(InvariantRef::new(&y), const { InvariantRef::<'a>::NEW });
-    //~^ ERROR `y` does not live long enough [E0597]
-}
-
-fn main() {
-    foo();
-}
diff --git a/src/test/ui/inline-const/const-expr-lifetime-err.stderr b/src/test/ui/inline-const/const-expr-lifetime-err.stderr
deleted file mode 100644
index a23f7c9a796..00000000000
--- a/src/test/ui/inline-const/const-expr-lifetime-err.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0597]: `y` does not live long enough
-  --> $DIR/const-expr-lifetime-err.rs:23:30
-   |
-LL | fn foo<'a>() {
-   |        -- lifetime `'a` defined here
-LL |     let y = ();
-LL |     equate(InvariantRef::new(&y), const { InvariantRef::<'a>::NEW });
-   |            ------------------^^-
-   |            |                 |
-   |            |                 borrowed value does not live long enough
-   |            argument requires that `y` is borrowed for `'a`
-LL |
-LL | }
-   | - `y` dropped here while still borrowed
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0597`.
diff --git a/src/test/ui/inline-const/const-expr-lifetime.rs b/src/test/ui/inline-const/const-expr-lifetime.rs
deleted file mode 100644
index d883deb2845..00000000000
--- a/src/test/ui/inline-const/const-expr-lifetime.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// run-pass
-
-#![feature(const_mut_refs)]
-#![feature(inline_const)]
-
-use std::marker::PhantomData;
-
-// rust-lang/rust#78174: ICE: "cannot convert ReErased to a region vid"
-fn issue_78174() {
-    let foo = const { "foo" };
-    assert_eq!(foo, "foo");
-}
-
-pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
-
-impl<'a, T: ?Sized> InvariantRef<'a, T> {
-    pub const fn new(r: &'a T) -> Self {
-        InvariantRef(r, PhantomData)
-    }
-}
-
-fn get_invariant_ref<'a>() -> InvariantRef<'a, ()> {
-    const { InvariantRef::<'a, ()>::new(&()) }
-}
-
-fn get_invariant_ref2<'a>() -> InvariantRef<'a, ()> {
-    // Try some type inference
-    const { InvariantRef::new(&()) }
-}
-
-fn main() {
-    issue_78174();
-    get_invariant_ref();
-    get_invariant_ref2();
-}
diff --git a/src/test/ui/inline-const/const-expr-macro.rs b/src/test/ui/inline-const/const-expr-macro.rs
deleted file mode 100644
index 041f3e15a29..00000000000
--- a/src/test/ui/inline-const/const-expr-macro.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// run-pass
-
-#![feature(inline_const)]
-
-macro_rules! do_const_block{
-    ($val:block) => { const $val }
-}
-
-fn main() {
-    let s = do_const_block!({ 22 });
-    assert_eq!(s, 22);
-}
diff --git a/src/test/ui/inline-const/const-expr-reference.rs b/src/test/ui/inline-const/const-expr-reference.rs
deleted file mode 100644
index a54d879f69d..00000000000
--- a/src/test/ui/inline-const/const-expr-reference.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// run-pass
-
-#![feature(inline_const)]
-
-const fn bar() -> i32 {
-    const {
-        2 + 3
-    }
-}
-
-fn main() {
-    let x: &'static i32 = &const{bar()};
-    assert_eq!(&5, x);
-}
diff --git a/src/test/ui/inline-const/const-match-pat-generic.rs b/src/test/ui/inline-const/const-match-pat-generic.rs
deleted file mode 100644
index 7c0d83516ea..00000000000
--- a/src/test/ui/inline-const/const-match-pat-generic.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-#![allow(incomplete_features)]
-#![feature(inline_const_pat)]
-
-// rust-lang/rust#82518: ICE with inline-const in match referencing const-generic parameter
-
-fn foo<const V: usize>() {
-    match 0 {
-        const { V } => {},
-        //~^ ERROR constant pattern depends on a generic parameter
-        //~| ERROR constant pattern depends on a generic parameter
-        _ => {},
-    }
-}
-
-const fn f(x: usize) -> usize {
-    x + 1
-}
-
-fn bar<const V: usize>() {
-    match 0 {
-        const { f(V) } => {},
-        //~^ ERROR constant pattern depends on a generic parameter
-        //~| ERROR constant pattern depends on a generic parameter
-        _ => {},
-    }
-}
-
-fn main() {
-    foo::<1>();
-    bar::<1>();
-}
diff --git a/src/test/ui/inline-const/const-match-pat-generic.stderr b/src/test/ui/inline-const/const-match-pat-generic.stderr
deleted file mode 100644
index 77267f12fb1..00000000000
--- a/src/test/ui/inline-const/const-match-pat-generic.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: constant pattern depends on a generic parameter
-  --> $DIR/const-match-pat-generic.rs:8:9
-   |
-LL |         const { V } => {},
-   |         ^^^^^^^^^^^
-
-error: constant pattern depends on a generic parameter
-  --> $DIR/const-match-pat-generic.rs:21:9
-   |
-LL |         const { f(V) } => {},
-   |         ^^^^^^^^^^^^^^
-
-error: constant pattern depends on a generic parameter
-  --> $DIR/const-match-pat-generic.rs:8:9
-   |
-LL |         const { V } => {},
-   |         ^^^^^^^^^^^
-
-error: constant pattern depends on a generic parameter
-  --> $DIR/const-match-pat-generic.rs:21:9
-   |
-LL |         const { f(V) } => {},
-   |         ^^^^^^^^^^^^^^
-
-error: aborting due to 4 previous errors
-
diff --git a/src/test/ui/inline-const/const-match-pat-inference.rs b/src/test/ui/inline-const/const-match-pat-inference.rs
deleted file mode 100644
index d83ae6e9834..00000000000
--- a/src/test/ui/inline-const/const-match-pat-inference.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-
-#![feature(inline_const_pat)]
-#![allow(incomplete_features)]
-
-fn main() {
-    match 1u64 {
-        0 => (),
-        const { 0 + 1 } => (),
-        const { 2 - 1 } ..= const { u64::MAX } => (),
-    }
-}
diff --git a/src/test/ui/inline-const/const-match-pat-lifetime-err.rs b/src/test/ui/inline-const/const-match-pat-lifetime-err.rs
deleted file mode 100644
index 436b8037f30..00000000000
--- a/src/test/ui/inline-const/const-match-pat-lifetime-err.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// ignore-test
-
-#![allow(incomplete_features)]
-#![feature(const_mut_refs)]
-#![feature(inline_const_pat)]
-
-use std::marker::PhantomData;
-
-#[derive(PartialEq, Eq)]
-pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
-
-impl<'a, T: ?Sized> InvariantRef<'a, T> {
-    pub const fn new(r: &'a T) -> Self {
-        InvariantRef(r, PhantomData)
-    }
-}
-
-impl<'a> InvariantRef<'a, ()> {
-    pub const NEW: Self = InvariantRef::new(&());
-}
-
-fn match_invariant_ref<'a>() {
-    let y = ();
-    match InvariantRef::new(&y) {
-    //~^ ERROR `y` does not live long enough [E0597]
-        // FIXME(nbdd0121): This should give the same error as `InvariantRef::<'a>::NEW` (without
-        // const block)
-        const { InvariantRef::<'a>::NEW } => (),
-    }
-}
-
-fn main() {
-    match_invariant_ref();
-}
diff --git a/src/test/ui/inline-const/const-match-pat-lifetime.rs b/src/test/ui/inline-const/const-match-pat-lifetime.rs
deleted file mode 100644
index 6d943bbcc01..00000000000
--- a/src/test/ui/inline-const/const-match-pat-lifetime.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// run-pass
-
-#![allow(incomplete_features)]
-#![feature(const_mut_refs)]
-#![feature(inline_const)]
-#![feature(inline_const_pat)]
-
-use std::marker::PhantomData;
-
-// rust-lang/rust#78174: ICE: "cannot convert ReErased to a region vid"
-fn issue_78174() {
-    match "foo" {
-        const { concat!("fo", "o") } => (),
-        _ => unreachable!(),
-    }
-}
-
-#[derive(PartialEq, Eq)]
-pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
-
-impl<'a, T: ?Sized> InvariantRef<'a, T> {
-    pub const fn new(r: &'a T) -> Self {
-        InvariantRef(r, PhantomData)
-    }
-}
-
-fn match_invariant_ref<'a>() {
-    match const { InvariantRef::<'a, _>::new(&()) } {
-        const { InvariantRef::<'a, ()>::new(&()) } => {
-        }
-    }
-}
-
-fn main() {
-    issue_78174();
-    match_invariant_ref();
-}
diff --git a/src/test/ui/inline-const/const-match-pat-range.rs b/src/test/ui/inline-const/const-match-pat-range.rs
deleted file mode 100644
index 73d6334c36f..00000000000
--- a/src/test/ui/inline-const/const-match-pat-range.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// build-pass
-
-#![allow(incomplete_features)]
-#![feature(inline_const_pat, exclusive_range_pattern)]
-
-fn main() {
-    const N: u32 = 10;
-    let x: u32 = 3;
-
-    match x {
-        1 ..= const { N + 1 } => {},
-        _ => {},
-    }
-
-    match x {
-        const { N - 1 } ..= 10 => {},
-        _ => {},
-    }
-
-    match x {
-        const { N - 1 } ..= const { N + 1 } => {},
-        _ => {},
-    }
-
-    match x {
-        .. const { N + 1 } => {},
-        _ => {},
-    }
-
-    match x {
-        const { N - 1 } .. => {},
-        _ => {},
-    }
-
-    match x {
-        ..= const { N + 1 } => {},
-        _ => {}
-    }
-}
diff --git a/src/test/ui/inline-const/const-match-pat.rs b/src/test/ui/inline-const/const-match-pat.rs
deleted file mode 100644
index 2f55e16b35c..00000000000
--- a/src/test/ui/inline-const/const-match-pat.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// run-pass
-
-#![allow(incomplete_features)]
-#![feature(inline_const_pat)]
-const MMIO_BIT1: u8 = 4;
-const MMIO_BIT2: u8 = 5;
-
-fn main() {
-    let s = match read_mmio() {
-        0 => "FOO",
-        const { 1 << MMIO_BIT1 } => "BAR",
-        const { 1 << MMIO_BIT2 } => "BAZ",
-        _ => unreachable!(),
-    };
-
-    assert_eq!("BAZ", s);
-}
-
-fn read_mmio() -> i32 {
-    1 << 5
-}
diff --git a/src/test/ui/inline-const/expr-unsafe-err.mir.stderr b/src/test/ui/inline-const/expr-unsafe-err.mir.stderr
deleted file mode 100644
index 1bec41e2efa..00000000000
--- a/src/test/ui/inline-const/expr-unsafe-err.mir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/expr-unsafe-err.rs:8:9
-   |
-LL |         require_unsafe();
-   |         ^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/ui/inline-const/expr-unsafe-err.rs b/src/test/ui/inline-const/expr-unsafe-err.rs
deleted file mode 100644
index adf05d352ea..00000000000
--- a/src/test/ui/inline-const/expr-unsafe-err.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-#![feature(inline_const)]
-const unsafe fn require_unsafe() -> usize { 1 }
-
-fn main() {
-    const {
-        require_unsafe();
-        //~^ ERROR [E0133]
-    }
-}
diff --git a/src/test/ui/inline-const/expr-unsafe-err.thir.stderr b/src/test/ui/inline-const/expr-unsafe-err.thir.stderr
deleted file mode 100644
index c971e8afb35..00000000000
--- a/src/test/ui/inline-const/expr-unsafe-err.thir.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
-  --> $DIR/expr-unsafe-err.rs:8:9
-   |
-LL |         require_unsafe();
-   |         ^^^^^^^^^^^^^^^^ call to unsafe function
-   |
-   = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
diff --git a/src/test/ui/inline-const/expr-unsafe.mir.stderr b/src/test/ui/inline-const/expr-unsafe.mir.stderr
deleted file mode 100644
index 1ab6e42fba0..00000000000
--- a/src/test/ui/inline-const/expr-unsafe.mir.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-warning: unnecessary `unsafe` block
-  --> $DIR/expr-unsafe.rs:12:13
-   |
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/expr-unsafe.rs:4:9
-   |
-LL | #![warn(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/inline-const/expr-unsafe.rs b/src/test/ui/inline-const/expr-unsafe.rs
deleted file mode 100644
index d71efd33db1..00000000000
--- a/src/test/ui/inline-const/expr-unsafe.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-#![warn(unused_unsafe)]
-#![feature(inline_const)]
-const unsafe fn require_unsafe() -> usize { 1 }
-
-fn main() {
-    unsafe {
-        const {
-            require_unsafe();
-            unsafe {}
-            //~^ WARNING unnecessary `unsafe` block
-        }
-    }
-}
diff --git a/src/test/ui/inline-const/expr-unsafe.thir.stderr b/src/test/ui/inline-const/expr-unsafe.thir.stderr
deleted file mode 100644
index 4737444fb61..00000000000
--- a/src/test/ui/inline-const/expr-unsafe.thir.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-warning: unnecessary `unsafe` block
-  --> $DIR/expr-unsafe.rs:12:13
-   |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-...
-LL |             unsafe {}
-   |             ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/expr-unsafe.rs:4:9
-   |
-LL | #![warn(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/inline-const/expr-with-block-err.rs b/src/test/ui/inline-const/expr-with-block-err.rs
deleted file mode 100644
index f7547742ddc..00000000000
--- a/src/test/ui/inline-const/expr-with-block-err.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![feature(inline_const)]
-
-fn main() {
-    const { 2 } - const { 1 };
-    //~^ ERROR mismatched types
-}
diff --git a/src/test/ui/inline-const/expr-with-block-err.stderr b/src/test/ui/inline-const/expr-with-block-err.stderr
deleted file mode 100644
index 6f7408f4e2a..00000000000
--- a/src/test/ui/inline-const/expr-with-block-err.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/expr-with-block-err.rs:4:13
-   |
-LL |     const { 2 } - const { 1 };
-   |             ^ expected `()`, found integer
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/inline-const/expr-with-block.rs b/src/test/ui/inline-const/expr-with-block.rs
deleted file mode 100644
index 391872476fc..00000000000
--- a/src/test/ui/inline-const/expr-with-block.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-#![feature(inline_const)]
-fn main() {
-    match true {
-        true => const {}
-        false => ()
-    }
-    const {}
-    ()
-}
diff --git a/src/test/ui/inline-const/macro-with-const.rs b/src/test/ui/inline-const/macro-with-const.rs
deleted file mode 100644
index e7393166d8d..00000000000
--- a/src/test/ui/inline-const/macro-with-const.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// check-pass
-
-macro_rules! exp {
-    (const $n:expr) => {
-        $n
-    };
-}
-
-macro_rules! stmt {
-    (exp $e:expr) => {
-        $e
-    };
-    (exp $($t:tt)+) => {
-        exp!($($t)+)
-    };
-}
-
-fn main() {
-    stmt!(exp const 1);
-}
diff --git a/src/test/ui/inline-const/pat-unsafe-err.rs b/src/test/ui/inline-const/pat-unsafe-err.rs
deleted file mode 100644
index e290b438c51..00000000000
--- a/src/test/ui/inline-const/pat-unsafe-err.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// ignore-test This is currently broken
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
-#![allow(incomplete_features)]
-#![feature(inline_const_pat)]
-
-const unsafe fn require_unsafe() -> usize { 1 }
-
-fn main() {
-    match () {
-        const {
-            require_unsafe();
-            //~^ ERROR [E0133]
-        } => (),
-    }
-}
diff --git a/src/test/ui/inline-const/pat-unsafe.rs b/src/test/ui/inline-const/pat-unsafe.rs
deleted file mode 100644
index bcf7f6e0180..00000000000
--- a/src/test/ui/inline-const/pat-unsafe.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// ignore-test This is currently broken
-// check-pass
-// revisions: mir thir
-// [thir]compile-flags: -Z thir-unsafeck
-
-#![allow(incomplete_features)]
-#![warn(unused_unsafe)]
-#![feature(inline_const_pat)]
-
-const unsafe fn require_unsafe() -> usize { 1 }
-
-fn main() {
-    unsafe {
-        match () {
-            const {
-                require_unsafe();
-                unsafe {}
-                //~^ WARNING unnecessary `unsafe` block
-            } => (),
-        }
-    }
-}