diff options
Diffstat (limited to '')
19 files changed, 23 insertions, 37 deletions
diff --git a/tests/ui/dyn-star/align.normal.stderr b/tests/ui/dyn-star/align.normal.stderr index 42fa4fd6f..d3ee0d3e5 100644 --- a/tests/ui/dyn-star/align.normal.stderr +++ b/tests/ui/dyn-star/align.normal.stderr @@ -15,6 +15,6 @@ LL | let x = AlignedUsize(12) as dyn* Debug; | = help: the trait `PointerLike` is not implemented for `AlignedUsize` -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/align.over_aligned.stderr b/tests/ui/dyn-star/align.over_aligned.stderr index 42fa4fd6f..d3ee0d3e5 100644 --- a/tests/ui/dyn-star/align.over_aligned.stderr +++ b/tests/ui/dyn-star/align.over_aligned.stderr @@ -15,6 +15,6 @@ LL | let x = AlignedUsize(12) as dyn* Debug; | = help: the trait `PointerLike` is not implemented for `AlignedUsize` -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/box.rs b/tests/ui/dyn-star/box.rs index 87c8356a1..8b2f46bd1 100644 --- a/tests/ui/dyn-star/box.rs +++ b/tests/ui/dyn-star/box.rs @@ -1,7 +1,7 @@ // run-pass // revisions: current next //[current] compile-flags: -C opt-level=0 -//[next] compile-flags: -Ztrait-solver=next -C opt-level=0 +//[next] compile-flags: -Znext-solver -C opt-level=0 #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr index ba42f619a..f291b1e2c 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr @@ -10,6 +10,6 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerLike { | +++++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr index ba42f619a..f291b1e2c 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.next.stderr @@ -10,6 +10,6 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | fn polymorphic<T: Debug + ?Sized>(t: &T) where &T: PointerLike { | +++++++++++++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs index 9846f8714..dffe6ae8a 100644 --- a/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs +++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.rs @@ -1,5 +1,5 @@ // revisions: current next -//[next] compile-flags: -Ztrait-solver=next +//[next] compile-flags: -Znext-solver #![feature(dyn_star)] #![allow(incomplete_features)] diff --git a/tests/ui/dyn-star/check-size-at-cast.stderr b/tests/ui/dyn-star/check-size-at-cast.stderr index e60b5c56f..b402403ee 100644 --- a/tests/ui/dyn-star/check-size-at-cast.stderr +++ b/tests/ui/dyn-star/check-size-at-cast.stderr @@ -6,6 +6,6 @@ LL | let i = [1, 2, 3, 4] as dyn* Debug; | = help: the trait `PointerLike` is not implemented for `[i32; 4]` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/dispatch-on-pin-mut.rs b/tests/ui/dyn-star/dispatch-on-pin-mut.rs index 5774c8b2a..c4ae279e6 100644 --- a/tests/ui/dyn-star/dispatch-on-pin-mut.rs +++ b/tests/ui/dyn-star/dispatch-on-pin-mut.rs @@ -4,6 +4,7 @@ #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes +#![feature(noop_waker)] use std::future::Future; @@ -18,33 +19,18 @@ async fn async_main() { // ------------------------------------------------------------------------- // // 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 ()) {} +use std::pin::pin; fn main() { - let mut fut = async_main(); + let mut fut = pin!(async_main()); // Poll loop, just to test the future... - let waker = noop_waker(); + let waker = Waker::noop(); let ctx = &mut Context::from_waker(&waker); loop { - match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } { + match fut.as_mut().poll(ctx) { Poll::Pending => {} Poll::Ready(()) => break, } diff --git a/tests/ui/dyn-star/dyn-to-rigid.stderr b/tests/ui/dyn-star/dyn-to-rigid.stderr index 588e6d97e..b198c5245 100644 --- a/tests/ui/dyn-star/dyn-to-rigid.stderr +++ b/tests/ui/dyn-star/dyn-to-rigid.stderr @@ -4,6 +4,6 @@ error[E0606]: casting `(dyn* Tr + 'static)` as `usize` is invalid LL | x as usize | ^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0606`. diff --git a/tests/ui/dyn-star/error.stderr b/tests/ui/dyn-star/error.stderr index e039bb6f1..a9f4a0545 100644 --- a/tests/ui/dyn-star/error.stderr +++ b/tests/ui/dyn-star/error.stderr @@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one LL | trait Foo {} | ^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/dyn-star/feature-gate-dyn_star.stderr b/tests/ui/dyn-star/feature-gate-dyn_star.stderr index 342e71c3a..d8fe25b84 100644 --- a/tests/ui/dyn-star/feature-gate-dyn_star.stderr +++ b/tests/ui/dyn-star/feature-gate-dyn_star.stderr @@ -7,6 +7,6 @@ LL | pub fn dyn_star_parameter(_: &dyn* Send) { = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information = help: add `#![feature(dyn_star)]` to the crate attributes to enable -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/dyn-star/gated-span.stderr b/tests/ui/dyn-star/gated-span.stderr index 626b6cd1b..da5afa2d5 100644 --- a/tests/ui/dyn-star/gated-span.stderr +++ b/tests/ui/dyn-star/gated-span.stderr @@ -7,6 +7,6 @@ LL | t!(dyn* Send); = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information = help: add `#![feature(dyn_star)]` to the crate attributes to enable -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/dyn-star/no-explicit-dyn-star.stderr b/tests/ui/dyn-star/no-explicit-dyn-star.stderr index 49706fae1..641404aa0 100644 --- a/tests/ui/dyn-star/no-explicit-dyn-star.stderr +++ b/tests/ui/dyn-star/no-explicit-dyn-star.stderr @@ -4,6 +4,6 @@ error[E0606]: casting `usize` as `dyn* std::fmt::Display` is invalid LL | dyn_star_foreign::require_dyn_star_display(1usize as _); | ^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0606`. diff --git a/tests/ui/dyn-star/no-implicit-dyn-star.stderr b/tests/ui/dyn-star/no-implicit-dyn-star.stderr index 66e1b9a09..06c7bcc57 100644 --- a/tests/ui/dyn-star/no-implicit-dyn-star.stderr +++ b/tests/ui/dyn-star/no-implicit-dyn-star.stderr @@ -14,6 +14,6 @@ note: function defined here LL | pub fn require_dyn_star_display(_: dyn* Display) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr b/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr index c7f1a4b9a..1f7bfb1d5 100644 --- a/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr +++ b/tests/ui/dyn-star/no-unsize-coerce-dyn-trait.stderr @@ -18,6 +18,6 @@ LL | let y: Box<dyn* B> = x; = note: expected struct `Box<dyn* B>` found struct `Box<dyn* A>` -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/dyn-star/param-env-region-infer.current.stderr b/tests/ui/dyn-star/param-env-region-infer.current.stderr index b982be451..b50117c1e 100644 --- a/tests/ui/dyn-star/param-env-region-infer.current.stderr +++ b/tests/ui/dyn-star/param-env-region-infer.current.stderr @@ -4,6 +4,6 @@ error[E0282]: type annotations needed LL | t as _ | ^ cannot infer type -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/dyn-star/param-env-region-infer.rs b/tests/ui/dyn-star/param-env-region-infer.rs index 50dec94d2..1e3317777 100644 --- a/tests/ui/dyn-star/param-env-region-infer.rs +++ b/tests/ui/dyn-star/param-env-region-infer.rs @@ -1,7 +1,7 @@ // revisions: current // incremental -// FIXME(-Ztrait-solver=next): THis currently results in unstable query results: +// FIXME(-Znext-solver): THis currently results in unstable query results: // `normalizes-to(opaque, opaque)` changes from `Maybe(Ambiguous)` to `Maybe(Overflow)` // once the hidden type of the opaque is already defined to be itself. diff --git a/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr b/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr index f6444a60a..b3274580a 100644 --- a/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr +++ b/tests/ui/dyn-star/unsize-into-ref-dyn-star.stderr @@ -4,6 +4,6 @@ error[E0605]: non-primitive cast: `i32` as `&dyn* Debug` 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 +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0605`. diff --git a/tests/ui/dyn-star/upcast.stderr b/tests/ui/dyn-star/upcast.stderr index 8b34c7f8b..adef9525b 100644 --- a/tests/ui/dyn-star/upcast.stderr +++ b/tests/ui/dyn-star/upcast.stderr @@ -15,6 +15,6 @@ LL | let w: dyn* Bar = w; | = help: the trait `PointerLike` is not implemented for `dyn* Foo` -error: aborting due to previous error; 1 warning emitted +error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0277`. |