summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dyn-star
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/dyn-star
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/dyn-star')
-rw-r--r--src/test/ui/dyn-star/align.normal.stderr11
-rw-r--r--src/test/ui/dyn-star/align.over_aligned.stderr20
-rw-r--r--src/test/ui/dyn-star/align.rs17
-rw-r--r--src/test/ui/dyn-star/auxiliary/dyn-star-foreign.rs10
-rw-r--r--src/test/ui/dyn-star/box.rs17
-rw-r--r--src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs15
-rw-r--r--src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.stderr15
-rw-r--r--src/test/ui/dyn-star/check-size-at-cast-polymorphic.rs16
-rw-r--r--src/test/ui/dyn-star/check-size-at-cast.rs10
-rw-r--r--src/test/ui/dyn-star/check-size-at-cast.stderr11
-rw-r--r--src/test/ui/dyn-star/const.rs14
-rw-r--r--src/test/ui/dyn-star/dispatch-on-pin-mut.rs52
-rw-r--r--src/test/ui/dyn-star/dispatch-on-pin-mut.run.stdout1
-rw-r--r--src/test/ui/dyn-star/dispatch-on-pin-mut.stderr11
-rw-r--r--src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs27
-rw-r--r--src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.run.stdout2
-rw-r--r--src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.stderr11
-rw-r--r--src/test/ui/dyn-star/drop.rs23
-rw-r--r--src/test/ui/dyn-star/drop.run.stdout1
-rw-r--r--src/test/ui/dyn-star/dyn-async-trait.rs36
-rw-r--r--src/test/ui/dyn-star/error.rs13
-rw-r--r--src/test/ui/dyn-star/error.stderr9
-rw-r--r--src/test/ui/dyn-star/feature-gate-dyn_star.rs9
-rw-r--r--src/test/ui/dyn-star/feature-gate-dyn_star.stderr12
-rw-r--r--src/test/ui/dyn-star/issue-102430.rs32
-rw-r--r--src/test/ui/dyn-star/make-dyn-star.rs18
-rw-r--r--src/test/ui/dyn-star/method.rs27
-rw-r--r--src/test/ui/dyn-star/no-explicit-dyn-star-cast.rs13
-rw-r--r--src/test/ui/dyn-star/no-explicit-dyn-star-cast.stderr28
-rw-r--r--src/test/ui/dyn-star/no-explicit-dyn-star.rs8
-rw-r--r--src/test/ui/dyn-star/no-explicit-dyn-star.stderr9
-rw-r--r--src/test/ui/dyn-star/no-implicit-dyn-star.rs8
-rw-r--r--src/test/ui/dyn-star/no-implicit-dyn-star.stderr19
-rw-r--r--src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.rs13
-rw-r--r--src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr23
-rw-r--r--src/test/ui/dyn-star/return.rs10
-rw-r--r--src/test/ui/dyn-star/return.stderr11
-rw-r--r--src/test/ui/dyn-star/syntax.rs11
-rw-r--r--src/test/ui/dyn-star/unsize-into-ref-dyn-star.rs9
-rw-r--r--src/test/ui/dyn-star/unsize-into-ref-dyn-star.stderr9
-rw-r--r--src/test/ui/dyn-star/upcast.rs32
-rw-r--r--src/test/ui/dyn-star/upcast.stderr20
42 files changed, 0 insertions, 663 deletions
diff --git a/src/test/ui/dyn-star/align.normal.stderr b/src/test/ui/dyn-star/align.normal.stderr
deleted file mode 100644
index 983d7bf6e..000000000
--- a/src/test/ui/dyn-star/align.normal.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/align.rs:4:12
- |
-LL | #![feature(dyn_star)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/dyn-star/align.over_aligned.stderr b/src/test/ui/dyn-star/align.over_aligned.stderr
deleted file mode 100644
index 6b6fc55d8..000000000
--- a/src/test/ui/dyn-star/align.over_aligned.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/align.rs:4:12
- |
-LL | #![feature(dyn_star)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-error[E0277]: `AlignedUsize` needs to be a pointer-sized type
- --> $DIR/align.rs:15:13
- |
-LL | let x = AlignedUsize(12) as dyn* Debug;
- | ^^^^^^^^^^^^^^^^ `AlignedUsize` needs to be a pointer-sized type
- |
- = help: the trait `PointerSized` is not implemented for `AlignedUsize`
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/dyn-star/align.rs b/src/test/ui/dyn-star/align.rs
deleted file mode 100644
index fb41a05a0..000000000
--- a/src/test/ui/dyn-star/align.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// revisions: normal over_aligned
-//[normal] check-pass
-
-#![feature(dyn_star)]
-//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
-
-use std::fmt::Debug;
-
-#[cfg_attr(over_aligned, repr(C, align(1024)))]
-#[cfg_attr(not(over_aligned), repr(C))]
-#[derive(Debug)]
-struct AlignedUsize(usize);
-
-fn main() {
- let x = AlignedUsize(12) as dyn* Debug;
- //[over_aligned]~^ ERROR `AlignedUsize` needs to be a pointer-sized type
-}
diff --git a/src/test/ui/dyn-star/auxiliary/dyn-star-foreign.rs b/src/test/ui/dyn-star/auxiliary/dyn-star-foreign.rs
deleted file mode 100644
index 7673c7936..000000000
--- a/src/test/ui/dyn-star/auxiliary/dyn-star-foreign.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Display;
-
-pub fn require_dyn_star_display(_: dyn* Display) {}
-
-fn works_locally() {
- require_dyn_star_display(1usize);
-}
diff --git a/src/test/ui/dyn-star/box.rs b/src/test/ui/dyn-star/box.rs
deleted file mode 100644
index d1f1819d9..000000000
--- a/src/test/ui/dyn-star/box.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-pass
-// compile-flags: -C opt-level=0
-
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Display;
-
-fn make_dyn_star() -> dyn* Display {
- Box::new(42) as dyn* Display
-}
-
-fn main() {
- let x = make_dyn_star();
-
- println!("{x}");
-}
diff --git a/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs b/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
deleted file mode 100644
index e19e36cc7..000000000
--- a/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-fn dyn_debug(_: (dyn* Debug + '_)) {
-
-}
-
-fn polymorphic<T: Debug + ?Sized>(t: &T) {
- dyn_debug(t);
- //~^ ERROR `&T` needs to be a pointer-sized type
-}
-
-fn main() {}
diff --git a/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.stderr b/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.stderr
deleted file mode 100644
index 53ccbe43d..000000000
--- a/src/test/ui/dyn-star/check-size-at-cast-polymorphic-bad.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0277]: `&T` needs to be a pointer-sized type
- --> $DIR/check-size-at-cast-polymorphic-bad.rs:11:15
- |
-LL | dyn_debug(t);
- | ^ `&T` needs to be a pointer-sized type
- |
- = help: the trait `PointerSized` is not implemented for `&T`
-help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
- |
-LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerSized {
- | ++++++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/dyn-star/check-size-at-cast-polymorphic.rs b/src/test/ui/dyn-star/check-size-at-cast-polymorphic.rs
deleted file mode 100644
index 5c0a3d256..000000000
--- a/src/test/ui/dyn-star/check-size-at-cast-polymorphic.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// check-pass
-
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-fn dyn_debug(_: (dyn* Debug + '_)) {
-
-}
-
-fn polymorphic<T: Debug>(t: &T) {
- dyn_debug(t);
-}
-
-fn main() {}
diff --git a/src/test/ui/dyn-star/check-size-at-cast.rs b/src/test/ui/dyn-star/check-size-at-cast.rs
deleted file mode 100644
index 1f22f7983..000000000
--- a/src/test/ui/dyn-star/check-size-at-cast.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-fn main() {
- let i = [1, 2, 3, 4] as dyn* Debug;
- //~^ ERROR `[i32; 4]` needs to be a pointer-sized type
- dbg!(i);
-}
diff --git a/src/test/ui/dyn-star/check-size-at-cast.stderr b/src/test/ui/dyn-star/check-size-at-cast.stderr
deleted file mode 100644
index af2a1ccf7..000000000
--- a/src/test/ui/dyn-star/check-size-at-cast.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0277]: `[i32; 4]` needs to be a pointer-sized type
- --> $DIR/check-size-at-cast.rs:7:13
- |
-LL | let i = [1, 2, 3, 4] as dyn* Debug;
- | ^^^^^^^^^^^^ `[i32; 4]` needs to be a pointer-sized type
- |
- = help: the trait `PointerSized` is not implemented for `[i32; 4]`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/dyn-star/const.rs b/src/test/ui/dyn-star/const.rs
deleted file mode 100644
index 67e3ab7ab..000000000
--- a/src/test/ui/dyn-star/const.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// run-pass
-#![feature(dyn_star)]
-#![allow(unused, incomplete_features)]
-
-use std::fmt::Debug;
-
-fn make_dyn_star() {
- let i = 42usize;
- let dyn_i: dyn* Debug = i;
-}
-
-fn main() {
- make_dyn_star();
-}
diff --git a/src/test/ui/dyn-star/dispatch-on-pin-mut.rs b/src/test/ui/dyn-star/dispatch-on-pin-mut.rs
deleted file mode 100644
index 5774c8b2a..000000000
--- a/src/test/ui/dyn-star/dispatch-on-pin-mut.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-// run-pass
-// edition:2021
-// check-run-results
-
-#![feature(dyn_star)]
-//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
-
-use std::future::Future;
-
-async fn foo(f: dyn* Future<Output = i32>) {
- println!("value: {}", f.await);
-}
-
-async fn async_main() {
- foo(Box::pin(async { 1 })).await
-}
-
-// ------------------------------------------------------------------------- //
-// Implementation Details Below...
-
-use std::pin::Pin;
-use std::task::*;
-
-pub fn noop_waker() -> Waker {
- let raw = RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE);
-
- // SAFETY: the contracts for RawWaker and RawWakerVTable are upheld
- unsafe { Waker::from_raw(raw) }
-}
-
-const NOOP_WAKER_VTABLE: RawWakerVTable = RawWakerVTable::new(noop_clone, noop, noop, noop);
-
-unsafe fn noop_clone(_p: *const ()) -> RawWaker {
- RawWaker::new(std::ptr::null(), &NOOP_WAKER_VTABLE)
-}
-
-unsafe fn noop(_p: *const ()) {}
-
-fn main() {
- let mut fut = async_main();
-
- // Poll loop, just to test the future...
- let waker = noop_waker();
- let ctx = &mut Context::from_waker(&waker);
-
- loop {
- match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } {
- Poll::Pending => {}
- Poll::Ready(()) => break,
- }
- }
-}
diff --git a/src/test/ui/dyn-star/dispatch-on-pin-mut.run.stdout b/src/test/ui/dyn-star/dispatch-on-pin-mut.run.stdout
deleted file mode 100644
index 96c5ca698..000000000
--- a/src/test/ui/dyn-star/dispatch-on-pin-mut.run.stdout
+++ /dev/null
@@ -1 +0,0 @@
-value: 1
diff --git a/src/test/ui/dyn-star/dispatch-on-pin-mut.stderr b/src/test/ui/dyn-star/dispatch-on-pin-mut.stderr
deleted file mode 100644
index fdf74aa7e..000000000
--- a/src/test/ui/dyn-star/dispatch-on-pin-mut.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/dispatch-on-pin-mut.rs:5:12
- |
-LL | #![feature(dyn_star)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs b/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs
deleted file mode 100644
index c12b16f16..000000000
--- a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// run-pass
-// check-run-results
-
-#![feature(dyn_star)]
-//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
-
-trait AddOne {
- fn add1(&mut self) -> usize;
-}
-
-impl AddOne for usize {
- fn add1(&mut self) -> usize {
- *self += 1;
- *self
- }
-}
-
-fn add_one(i: &mut (dyn* AddOne + '_)) -> usize {
- i.add1()
-}
-
-fn main() {
- let mut x = 42usize as dyn* AddOne;
-
- println!("{}", add_one(&mut x));
- println!("{}", add_one(&mut x));
-}
diff --git a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.run.stdout b/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.run.stdout
deleted file mode 100644
index b4db3ed70..000000000
--- a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.run.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-43
-44
diff --git a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.stderr b/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.stderr
deleted file mode 100644
index 933c13383..000000000
--- a/src/test/ui/dyn-star/dont-unsize-coerce-dyn-star.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/dont-unsize-coerce-dyn-star.rs:4:12
- |
-LL | #![feature(dyn_star)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/dyn-star/drop.rs b/src/test/ui/dyn-star/drop.rs
deleted file mode 100644
index 1478498c0..000000000
--- a/src/test/ui/dyn-star/drop.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// run-pass
-// check-run-results
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-#[derive(Debug)]
-struct Foo(usize);
-
-impl Drop for Foo {
- fn drop(&mut self) {
- println!("destructor called");
- }
-}
-
-fn make_dyn_star(i: Foo) {
- let _dyn_i: dyn* Debug = i;
-}
-
-fn main() {
- make_dyn_star(Foo(42));
-}
diff --git a/src/test/ui/dyn-star/drop.run.stdout b/src/test/ui/dyn-star/drop.run.stdout
deleted file mode 100644
index dadb33ccf..000000000
--- a/src/test/ui/dyn-star/drop.run.stdout
+++ /dev/null
@@ -1 +0,0 @@
-destructor called
diff --git a/src/test/ui/dyn-star/dyn-async-trait.rs b/src/test/ui/dyn-star/dyn-async-trait.rs
deleted file mode 100644
index 9b27133b4..000000000
--- a/src/test/ui/dyn-star/dyn-async-trait.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// check-pass
-// edition: 2021
-
-// This test case is meant to demonstrate how close we can get to async
-// functions in dyn traits with the current level of dyn* support.
-
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::future::Future;
-
-trait DynAsyncCounter {
- fn increment<'a>(&'a mut self) -> dyn* Future<Output = usize> + 'a;
-}
-
-struct MyCounter {
- count: usize,
-}
-
-impl DynAsyncCounter for MyCounter {
- fn increment<'a>(&'a mut self) -> dyn* Future<Output = usize> + 'a {
- Box::pin(async {
- self.count += 1;
- self.count
- })
- }
-}
-
-async fn do_counter(counter: &mut dyn DynAsyncCounter) -> usize {
- counter.increment().await
-}
-
-fn main() {
- let mut counter = MyCounter { count: 0 };
- let _ = do_counter(&mut counter);
-}
diff --git a/src/test/ui/dyn-star/error.rs b/src/test/ui/dyn-star/error.rs
deleted file mode 100644
index d8261387e..000000000
--- a/src/test/ui/dyn-star/error.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-trait Foo {}
-
-fn make_dyn_star() {
- let i = 42;
- let dyn_i: dyn* Foo = i; //~ ERROR trait bound `{integer}: Foo` is not satisfied
-}
-
-fn main() {}
diff --git a/src/test/ui/dyn-star/error.stderr b/src/test/ui/dyn-star/error.stderr
deleted file mode 100644
index ae54b9ca7..000000000
--- a/src/test/ui/dyn-star/error.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0277]: the trait bound `{integer}: Foo` is not satisfied
- --> $DIR/error.rs:10:27
- |
-LL | let dyn_i: dyn* Foo = i;
- | ^ the trait `Foo` is not implemented for `{integer}`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/dyn-star/feature-gate-dyn_star.rs b/src/test/ui/dyn-star/feature-gate-dyn_star.rs
deleted file mode 100644
index 4756661cf..000000000
--- a/src/test/ui/dyn-star/feature-gate-dyn_star.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Feature gate test for dyn_star
-
-/// dyn* is not necessarily the final surface syntax (if we have one at all),
-/// but for now we will support it to aid in writing tests independently.
-pub fn dyn_star_parameter(_: &dyn* Send) {
- //~^ dyn* trait objects are unstable
-}
-
-fn main() {}
diff --git a/src/test/ui/dyn-star/feature-gate-dyn_star.stderr b/src/test/ui/dyn-star/feature-gate-dyn_star.stderr
deleted file mode 100644
index 2767e9478..000000000
--- a/src/test/ui/dyn-star/feature-gate-dyn_star.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: dyn* trait objects are unstable
- --> $DIR/feature-gate-dyn_star.rs:5:31
- |
-LL | pub fn dyn_star_parameter(_: &dyn* Send) {
- | ^^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = help: add `#![feature(dyn_star)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/dyn-star/issue-102430.rs b/src/test/ui/dyn-star/issue-102430.rs
deleted file mode 100644
index 244ecda66..000000000
--- a/src/test/ui/dyn-star/issue-102430.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// check-pass
-
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-trait AddOne {
- fn add1(&mut self) -> usize;
-}
-
-impl AddOne for usize {
- fn add1(&mut self) -> usize {
- *self += 1;
- *self
- }
-}
-
-impl AddOne for &mut usize {
- fn add1(&mut self) -> usize {
- (*self).add1()
- }
-}
-
-fn add_one(mut i: dyn* AddOne + '_) -> usize {
- i.add1()
-}
-
-fn main() {
- let mut x = 42usize;
- let y = &mut x as (dyn* AddOne + '_);
-
- println!("{}", add_one(y));
-}
diff --git a/src/test/ui/dyn-star/make-dyn-star.rs b/src/test/ui/dyn-star/make-dyn-star.rs
deleted file mode 100644
index e5255a64b..000000000
--- a/src/test/ui/dyn-star/make-dyn-star.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// run-pass
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-fn make_dyn_star(i: usize) {
- let _dyn_i: dyn* Debug = i;
-}
-
-fn make_dyn_star_explicit(i: usize) {
- let _dyn_i: dyn* Debug = i as dyn* Debug;
-}
-
-fn main() {
- make_dyn_star(42);
- make_dyn_star_explicit(42);
-}
diff --git a/src/test/ui/dyn-star/method.rs b/src/test/ui/dyn-star/method.rs
deleted file mode 100644
index 5a77640f0..000000000
--- a/src/test/ui/dyn-star/method.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// run-pass
-
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-trait Foo {
- fn get(&self) -> usize;
-}
-
-impl Foo for usize {
- fn get(&self) -> usize {
- *self
- }
-}
-
-fn invoke_dyn_star(i: dyn* Foo) -> usize {
- i.get()
-}
-
-fn make_and_invoke_dyn_star(i: usize) -> usize {
- let dyn_i: dyn* Foo = i;
- invoke_dyn_star(dyn_i)
-}
-
-fn main() {
- println!("{}", make_and_invoke_dyn_star(42));
-}
diff --git a/src/test/ui/dyn-star/no-explicit-dyn-star-cast.rs b/src/test/ui/dyn-star/no-explicit-dyn-star-cast.rs
deleted file mode 100644
index 67240c8e8..000000000
--- a/src/test/ui/dyn-star/no-explicit-dyn-star-cast.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-use std::fmt::Debug;
-
-fn make_dyn_star() {
- let i = 42usize;
- let dyn_i: dyn* Debug = i as dyn* Debug;
- //~^ ERROR casting `usize` as `dyn* Debug` is invalid
- //~| ERROR dyn* trait objects are unstable
- //~| ERROR dyn* trait objects are unstable
-}
-
-fn main() {
- make_dyn_star();
-}
diff --git a/src/test/ui/dyn-star/no-explicit-dyn-star-cast.stderr b/src/test/ui/dyn-star/no-explicit-dyn-star-cast.stderr
deleted file mode 100644
index 687d7db04..000000000
--- a/src/test/ui/dyn-star/no-explicit-dyn-star-cast.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-error[E0658]: dyn* trait objects are unstable
- --> $DIR/no-explicit-dyn-star-cast.rs:5:16
- |
-LL | let dyn_i: dyn* Debug = i as dyn* Debug;
- | ^^^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = help: add `#![feature(dyn_star)]` to the crate attributes to enable
-
-error[E0658]: dyn* trait objects are unstable
- --> $DIR/no-explicit-dyn-star-cast.rs:5:34
- |
-LL | let dyn_i: dyn* Debug = i as dyn* Debug;
- | ^^^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = help: add `#![feature(dyn_star)]` to the crate attributes to enable
-
-error[E0606]: casting `usize` as `dyn* Debug` is invalid
- --> $DIR/no-explicit-dyn-star-cast.rs:5:29
- |
-LL | let dyn_i: dyn* Debug = i as dyn* Debug;
- | ^^^^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0606, E0658.
-For more information about an error, try `rustc --explain E0606`.
diff --git a/src/test/ui/dyn-star/no-explicit-dyn-star.rs b/src/test/ui/dyn-star/no-explicit-dyn-star.rs
deleted file mode 100644
index 4f726b7c6..000000000
--- a/src/test/ui/dyn-star/no-explicit-dyn-star.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:dyn-star-foreign.rs
-
-extern crate dyn_star_foreign;
-
-fn main() {
- dyn_star_foreign::require_dyn_star_display(1usize as _);
- //~^ ERROR casting `usize` as `dyn* std::fmt::Display` is invalid
-}
diff --git a/src/test/ui/dyn-star/no-explicit-dyn-star.stderr b/src/test/ui/dyn-star/no-explicit-dyn-star.stderr
deleted file mode 100644
index 49706fae1..000000000
--- a/src/test/ui/dyn-star/no-explicit-dyn-star.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0606]: casting `usize` as `dyn* std::fmt::Display` is invalid
- --> $DIR/no-explicit-dyn-star.rs:6:48
- |
-LL | dyn_star_foreign::require_dyn_star_display(1usize as _);
- | ^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0606`.
diff --git a/src/test/ui/dyn-star/no-implicit-dyn-star.rs b/src/test/ui/dyn-star/no-implicit-dyn-star.rs
deleted file mode 100644
index d9470e284..000000000
--- a/src/test/ui/dyn-star/no-implicit-dyn-star.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:dyn-star-foreign.rs
-
-extern crate dyn_star_foreign;
-
-fn main() {
- dyn_star_foreign::require_dyn_star_display(1usize);
- //~^ ERROR mismatched types
-}
diff --git a/src/test/ui/dyn-star/no-implicit-dyn-star.stderr b/src/test/ui/dyn-star/no-implicit-dyn-star.stderr
deleted file mode 100644
index e7c591862..000000000
--- a/src/test/ui/dyn-star/no-implicit-dyn-star.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/no-implicit-dyn-star.rs:6:48
- |
-LL | dyn_star_foreign::require_dyn_star_display(1usize);
- | ------------------------------------------ ^^^^^^ expected trait object `dyn std::fmt::Display`, found `usize`
- | |
- | arguments to this function are incorrect
- |
- = note: expected trait object `(dyn* std::fmt::Display + 'static)`
- found type `usize`
-note: function defined here
- --> $DIR/auxiliary/dyn-star-foreign.rs:6:8
- |
-LL | pub fn require_dyn_star_display(_: dyn* Display) {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.rs b/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.rs
deleted file mode 100644
index a4eb669e3..000000000
--- a/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#![feature(dyn_star, trait_upcasting)]
-//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
-
-trait A: B {}
-trait B {}
-impl A for usize {}
-impl B for usize {}
-
-fn main() {
- let x: Box<dyn* A> = Box::new(1usize as dyn* A);
- let y: Box<dyn* B> = x;
- //~^ ERROR mismatched types
-}
diff --git a/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr b/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr
deleted file mode 100644
index 2fc751b3b..000000000
--- a/src/test/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/no-unsize-coerce-dyn-trait.rs:1:12
- |
-LL | #![feature(dyn_star, trait_upcasting)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-error[E0308]: mismatched types
- --> $DIR/no-unsize-coerce-dyn-trait.rs:11:26
- |
-LL | let y: Box<dyn* B> = x;
- | ----------- ^ expected trait `B`, found trait `A`
- | |
- | expected due to this
- |
- = note: expected struct `Box<dyn* B>`
- found struct `Box<dyn* A>`
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/dyn-star/return.rs b/src/test/ui/dyn-star/return.rs
deleted file mode 100644
index fa3d8d7d5..000000000
--- a/src/test/ui/dyn-star/return.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-
-#![feature(dyn_star)]
-//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
-
-fn _foo() -> dyn* Unpin {
- 4usize
-}
-
-fn main() {}
diff --git a/src/test/ui/dyn-star/return.stderr b/src/test/ui/dyn-star/return.stderr
deleted file mode 100644
index e000351a6..000000000
--- a/src/test/ui/dyn-star/return.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/return.rs:3:12
- |
-LL | #![feature(dyn_star)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/dyn-star/syntax.rs b/src/test/ui/dyn-star/syntax.rs
deleted file mode 100644
index 618c72562..000000000
--- a/src/test/ui/dyn-star/syntax.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Make sure we can parse the `dyn* Trait` syntax
-//
-// check-pass
-
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-pub fn dyn_star_parameter(_: dyn* Send) {
-}
-
-fn main() {}
diff --git a/src/test/ui/dyn-star/unsize-into-ref-dyn-star.rs b/src/test/ui/dyn-star/unsize-into-ref-dyn-star.rs
deleted file mode 100644
index 1e8cafe15..000000000
--- a/src/test/ui/dyn-star/unsize-into-ref-dyn-star.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(dyn_star)]
-#![allow(incomplete_features)]
-
-use std::fmt::Debug;
-
-fn main() {
- let i = 42 as &dyn* Debug;
- //~^ ERROR non-primitive cast: `i32` as `&dyn* Debug`
-}
diff --git a/src/test/ui/dyn-star/unsize-into-ref-dyn-star.stderr b/src/test/ui/dyn-star/unsize-into-ref-dyn-star.stderr
deleted file mode 100644
index f6444a60a..000000000
--- a/src/test/ui/dyn-star/unsize-into-ref-dyn-star.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0605]: non-primitive cast: `i32` as `&dyn* Debug`
- --> $DIR/unsize-into-ref-dyn-star.rs:7:13
- |
-LL | let i = 42 as &dyn* Debug;
- | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0605`.
diff --git a/src/test/ui/dyn-star/upcast.rs b/src/test/ui/dyn-star/upcast.rs
deleted file mode 100644
index c667ac143..000000000
--- a/src/test/ui/dyn-star/upcast.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// known-bug: #104800
-
-#![feature(dyn_star, trait_upcasting)]
-
-trait Foo: Bar {
- fn hello(&self);
-}
-
-trait Bar {
- fn world(&self);
-}
-
-struct W(usize);
-
-impl Foo for W {
- fn hello(&self) {
- println!("hello!");
- }
-}
-
-impl Bar for W {
- fn world(&self) {
- println!("world!");
- }
-}
-
-fn main() {
- let w: dyn* Foo = W(0);
- w.hello();
- let w: dyn* Bar = w;
- w.world();
-}
diff --git a/src/test/ui/dyn-star/upcast.stderr b/src/test/ui/dyn-star/upcast.stderr
deleted file mode 100644
index 6a95f7754..000000000
--- a/src/test/ui/dyn-star/upcast.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
- --> $DIR/upcast.rs:3:12
- |
-LL | #![feature(dyn_star, trait_upcasting)]
- | ^^^^^^^^
- |
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = note: `#[warn(incomplete_features)]` on by default
-
-error[E0277]: `dyn* Foo` needs to be a pointer-sized type
- --> $DIR/upcast.rs:30:23
- |
-LL | let w: dyn* Bar = w;
- | ^ `dyn* Foo` needs to be a pointer-sized type
- |
- = help: the trait `PointerSized` is not implemented for `dyn* Foo`
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0277`.