diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/impl-trait/issues/issue-78722.rs | 4 | ||||
-rw-r--r-- | src/test/ui/impl-trait/issues/issue-78722.stderr | 6 | ||||
-rw-r--r-- | src/test/ui/impl-trait/issues/issue-86800.stderr | 15 |
3 files changed, 16 insertions, 9 deletions
diff --git a/src/test/ui/impl-trait/issues/issue-78722.rs b/src/test/ui/impl-trait/issues/issue-78722.rs index 002e4cde4..9ee1ba3d3 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.rs +++ b/src/test/ui/impl-trait/issues/issue-78722.rs @@ -7,12 +7,12 @@ type F = impl core::future::Future<Output = u8>; struct Bug { V1: [(); { fn concrete_use() -> F { - //~^ ERROR type mismatch + //~^ ERROR expected `impl Future<Output = ()>` to be a future that resolves to `u8`, but it resolves to `()` async {} } let f: F = async { 1 }; //~^ ERROR `async` blocks are not allowed in constants - //~| ERROR destructors cannot be evaluated at compile-time + //~| ERROR destructor of 1 }], } diff --git a/src/test/ui/impl-trait/issues/issue-78722.stderr b/src/test/ui/impl-trait/issues/issue-78722.stderr index 690d6abc7..a96994f5a 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.stderr +++ b/src/test/ui/impl-trait/issues/issue-78722.stderr @@ -7,16 +7,16 @@ LL | let f: F = async { 1 }; = note: see issue #85368 <https://github.com/rust-lang/rust/issues/85368> for more information = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable -error[E0493]: destructors cannot be evaluated at compile-time +error[E0493]: destructor of `F` cannot be evaluated at compile-time --> $DIR/issue-78722.rs:13:13 | LL | let f: F = async { 1 }; - | ^ constants cannot evaluate destructors + | ^ the destructor for this type cannot be evaluated in constants ... LL | }], | - value is dropped here -error[E0271]: type mismatch resolving `<impl Future<Output = ()> as Future>::Output == u8` +error[E0271]: expected `impl Future<Output = ()>` to be a future that resolves to `u8`, but it resolves to `()` --> $DIR/issue-78722.rs:9:30 | LL | fn concrete_use() -> F { diff --git a/src/test/ui/impl-trait/issues/issue-86800.stderr b/src/test/ui/impl-trait/issues/issue-86800.stderr index 135d06d44..6c4aa3567 100644 --- a/src/test/ui/impl-trait/issues/issue-86800.stderr +++ b/src/test/ui/impl-trait/issues/issue-86800.stderr @@ -1,3 +1,11 @@ +error: unconstrained opaque type + --> $DIR/issue-86800.rs:33:34 + | +LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = + stack backtrace: @@ -12,8 +20,7 @@ error: internal compiler error: unexpected panic query stack during panic: -#0 [mir_borrowck] borrow-checking `execute_transaction_fut` -#1 [type_of] computing type of `TransactionFuture::{opaque#0}` -#2 [check_mod_item_types] checking item types in top-level module -#3 [analysis] running analysis passes on this crate +#0 [type_of] computing type of `TransactionFuture::{opaque#0}` +#1 [check_mod_item_types] checking item types in top-level module +#2 [analysis] running analysis passes on this crate end of query stack |