diff options
Diffstat (limited to 'tests/ui/impl-trait/issues')
-rw-r--r-- | tests/ui/impl-trait/issues/issue-78722.rs | 1 | ||||
-rw-r--r-- | tests/ui/impl-trait/issues/issue-78722.stderr | 13 | ||||
-rw-r--r-- | tests/ui/impl-trait/issues/issue-82139.rs | 2 | ||||
-rw-r--r-- | tests/ui/impl-trait/issues/issue-83919.rs | 12 | ||||
-rw-r--r-- | tests/ui/impl-trait/issues/issue-86719.rs | 5 | ||||
-rw-r--r-- | tests/ui/impl-trait/issues/issue-86719.stderr | 3 | ||||
-rw-r--r-- | tests/ui/impl-trait/issues/issue-87340.rs | 4 |
7 files changed, 16 insertions, 24 deletions
diff --git a/tests/ui/impl-trait/issues/issue-78722.rs b/tests/ui/impl-trait/issues/issue-78722.rs index 78233f300..7b5ab5f22 100644 --- a/tests/ui/impl-trait/issues/issue-78722.rs +++ b/tests/ui/impl-trait/issues/issue-78722.rs @@ -12,7 +12,6 @@ struct Bug { } let f: F = async { 1 }; //~^ ERROR `async` blocks are not allowed in constants - //~| ERROR destructor of 1 }], } diff --git a/tests/ui/impl-trait/issues/issue-78722.stderr b/tests/ui/impl-trait/issues/issue-78722.stderr index c00df8087..05a2c135c 100644 --- a/tests/ui/impl-trait/issues/issue-78722.stderr +++ b/tests/ui/impl-trait/issues/issue-78722.stderr @@ -7,22 +7,13 @@ 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]: destructor of `F` cannot be evaluated at compile-time - --> $DIR/issue-78722.rs:13:13 - | -LL | let f: F = async { 1 }; - | ^ the destructor for this type cannot be evaluated in constants -... -LL | }], - | - value is dropped here - error[E0271]: expected `[async block@$DIR/issue-78722.rs:11:13: 11:21]` to be a future that resolves to `u8`, but it resolves to `()` --> $DIR/issue-78722.rs:9:30 | LL | fn concrete_use() -> F { | ^ expected `()`, found `u8` -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0271, E0493, E0658. +Some errors have detailed explanations: E0271, E0658. For more information about an error, try `rustc --explain E0271`. diff --git a/tests/ui/impl-trait/issues/issue-82139.rs b/tests/ui/impl-trait/issues/issue-82139.rs index cc9167b34..3f0b0f1a8 100644 --- a/tests/ui/impl-trait/issues/issue-82139.rs +++ b/tests/ui/impl-trait/issues/issue-82139.rs @@ -1,4 +1,4 @@ -#![feature(type_alias_impl_trait)] +#![feature(impl_trait_in_assoc_type)] trait Trait { type Associated; diff --git a/tests/ui/impl-trait/issues/issue-83919.rs b/tests/ui/impl-trait/issues/issue-83919.rs index e76443a65..4e699e7f3 100644 --- a/tests/ui/impl-trait/issues/issue-83919.rs +++ b/tests/ui/impl-trait/issues/issue-83919.rs @@ -1,4 +1,4 @@ -#![feature(type_alias_impl_trait)] +#![feature(impl_trait_in_assoc_type)] // edition:2021 @@ -6,8 +6,8 @@ use std::future::Future; trait Foo { type T; - type Fut2: Future<Output=Self::T>; // ICE got triggered with traits other than Future here - type Fut: Future<Output=Self::Fut2>; + type Fut2: Future<Output = Self::T>; // ICE got triggered with traits other than Future here + type Fut: Future<Output = Self::Fut2>; fn get_fut(&self) -> Self::Fut; } @@ -15,11 +15,11 @@ struct Implementor; impl Foo for Implementor { type T = u64; - type Fut2 = impl Future<Output=u64>; - type Fut = impl Future<Output=Self::Fut2>; + type Fut2 = impl Future<Output = u64>; + type Fut = impl Future<Output = Self::Fut2>; fn get_fut(&self) -> Self::Fut { - //~^ ERROR `{integer}` is not a future + //~^ ERROR `{integer}` is not a future async move { 42 // 42 does not impl Future and rustc does actually point out the error, diff --git a/tests/ui/impl-trait/issues/issue-86719.rs b/tests/ui/impl-trait/issues/issue-86719.rs index f4b0b3f33..7abab5bfb 100644 --- a/tests/ui/impl-trait/issues/issue-86719.rs +++ b/tests/ui/impl-trait/issues/issue-86719.rs @@ -1,11 +1,12 @@ -#![feature(type_alias_impl_trait)] +#![feature(impl_trait_in_assoc_type)] trait Bar { type E; } impl<S> Bar for S { type E = impl ; //~ ERROR at least one trait must be specified - fn foo() -> Self::E { //~ ERROR `foo` is not a member + fn foo() -> Self::E { + //~^ ERROR `foo` is not a member |_| true //~ ERROR type annotations needed } } diff --git a/tests/ui/impl-trait/issues/issue-86719.stderr b/tests/ui/impl-trait/issues/issue-86719.stderr index 7592418fd..15893df5f 100644 --- a/tests/ui/impl-trait/issues/issue-86719.stderr +++ b/tests/ui/impl-trait/issues/issue-86719.stderr @@ -8,12 +8,13 @@ error[E0407]: method `foo` is not a member of trait `Bar` --> $DIR/issue-86719.rs:8:5 | LL | / fn foo() -> Self::E { +LL | | LL | | |_| true LL | | } | |_____^ not a member of trait `Bar` error[E0282]: type annotations needed - --> $DIR/issue-86719.rs:9:10 + --> $DIR/issue-86719.rs:10:10 | LL | |_| true | ^ diff --git a/tests/ui/impl-trait/issues/issue-87340.rs b/tests/ui/impl-trait/issues/issue-87340.rs index f0f6d2bb6..705a4addc 100644 --- a/tests/ui/impl-trait/issues/issue-87340.rs +++ b/tests/ui/impl-trait/issues/issue-87340.rs @@ -1,4 +1,4 @@ -#![feature(type_alias_impl_trait)] +#![feature(impl_trait_in_assoc_type)] trait X { type I; @@ -6,7 +6,7 @@ trait X { } impl<T> X for () { -//~^ ERROR `T` is not constrained by the impl trait, self type, or predicates + //~^ ERROR `T` is not constrained by the impl trait, self type, or predicates type I = impl Sized; fn f() -> Self::I {} } |