summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/ui/impl-trait/issues
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/impl-trait/issues')
-rw-r--r--tests/ui/impl-trait/issues/issue-78722.rs1
-rw-r--r--tests/ui/impl-trait/issues/issue-78722.stderr13
-rw-r--r--tests/ui/impl-trait/issues/issue-82139.rs2
-rw-r--r--tests/ui/impl-trait/issues/issue-83919.rs12
-rw-r--r--tests/ui/impl-trait/issues/issue-86719.rs5
-rw-r--r--tests/ui/impl-trait/issues/issue-86719.stderr3
-rw-r--r--tests/ui/impl-trait/issues/issue-87340.rs4
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 {}
}