diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs')
-rw-r--r-- | src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs deleted file mode 100644 index f3474bc1f..000000000 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs +++ /dev/null @@ -1,35 +0,0 @@ -// check-pass -// edition:2018 - -use std::pin::Pin; -use std::task::{Context, Poll}; - -struct Foo; - -impl Foo { - async fn pin_ref(self: Pin<&Self>) -> Pin<&Self> { self } - - async fn pin_mut(self: Pin<&mut Self>) -> Pin<&mut Self> { self } - - async fn pin_pin_pin_ref(self: Pin<Pin<Pin<&Self>>>) -> Pin<Pin<Pin<&Self>>> { self } - - async fn pin_ref_impl_trait(self: Pin<&Self>) -> impl Clone + '_ { self } - - fn b(self: Pin<&Foo>, f: &Foo) -> Pin<&Foo> { self } -} - -type Alias<T> = Pin<T>; -impl Foo { - async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> Alias<&Self> { self } -} - -// FIXME(Centril): extend with the rest of the non-`async fn` test -// when we allow `async fn`s inside traits and trait implementations. - -fn main() { - let mut foo = Foo; - { Pin::new(&foo).pin_ref() }; - { Pin::new(&mut foo).pin_mut() }; - { Pin::new(Pin::new(Pin::new(&foo))).pin_pin_pin_ref() }; - { Pin::new(&foo).pin_ref_impl_trait() }; -} |