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/try-trait/try-poll.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/try-trait/try-poll.rs')
-rw-r--r-- | src/test/ui/try-trait/try-poll.rs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/test/ui/try-trait/try-poll.rs b/src/test/ui/try-trait/try-poll.rs deleted file mode 100644 index d42e51c74..000000000 --- a/src/test/ui/try-trait/try-poll.rs +++ /dev/null @@ -1,50 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) - -#![allow(dead_code, unused)] - -use std::task::Poll; - -struct K; -struct E; - -fn as_result() -> Result<(), E> { - // From Result - let K = Ok::<K, E>(K)?; - - // From Poll<Result> - let _: Poll<K> = Poll::Ready::<Result<K, E>>(Ok(K))?; - - // From Poll<Option<Result>> - let _: Poll<Option<K>> = Poll::Ready::<Option<Result<K, E>>>(None)?; - - Ok(()) -} - -fn as_poll_result() -> Poll<Result<(), E>> { - // From Result - let K = Ok::<K, E>(K)?; - - // From Poll<Result> - let _: Poll<K> = Poll::Ready::<Result<K, E>>(Ok(K))?; - - // From Poll<Option<Result>> - let _: Poll<Option<K>> = Poll::Ready::<Option<Result<K, E>>>(None)?; - - Poll::Ready(Ok(())) -} - -fn as_poll_option_result() -> Poll<Option<Result<(), E>>> { - // From Result - let K = Ok::<K, E>(K)?; - - // From Poll<Result> - let _: Poll<K> = Poll::Ready::<Result<K, E>>(Ok(K))?; - - // From Poll<Option<Result>> - let _: Poll<Option<K>> = Poll::Ready::<Option<Result<K, E>>>(None)?; - - Poll::Ready(Some(Ok(()))) -} - -fn main() { -} |