summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /tests/ui/async-await/in-trait/async-example-desugared-extra.rs
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/async-await/in-trait/async-example-desugared-extra.rs')
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-extra.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
index 81e1e59a3..3505690f1 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
@@ -2,14 +2,14 @@
// edition: 2021
#![feature(async_fn_in_trait)]
-#![feature(return_position_impl_trait_in_trait)]
+#![feature(return_position_impl_trait_in_trait, lint_reasons)]
#![allow(incomplete_features)]
use std::future::Future;
use std::pin::Pin;
use std::task::Poll;
-trait MyTrait {
+pub trait MyTrait {
async fn foo(&self) -> i32;
}
@@ -27,8 +27,7 @@ impl Future for MyFuture {
}
impl MyTrait for i32 {
- // FIXME: this should eventually require `#[refine]` to compile, because it also provides
- // `Clone`.
+ #[expect(refining_impl_trait)]
fn foo(&self) -> impl Future<Output = i32> + Clone {
MyFuture(*self)
}