about summary refs log tree commit diff
path: root/src/test/ui/lint/unused/must_use-in-stdlib-traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/unused/must_use-in-stdlib-traits.rs')
-rw-r--r--src/test/ui/lint/unused/must_use-in-stdlib-traits.rs47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/test/ui/lint/unused/must_use-in-stdlib-traits.rs b/src/test/ui/lint/unused/must_use-in-stdlib-traits.rs
deleted file mode 100644
index 70dddf61fb7..00000000000
--- a/src/test/ui/lint/unused/must_use-in-stdlib-traits.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-#![deny(unused_must_use)]
-#![feature(arbitrary_self_types)]
-
-use std::iter::Iterator;
-use std::future::Future;
-
-use std::task::{Context, Poll};
-use std::pin::Pin;
-use std::unimplemented;
-
-struct MyFuture;
-
-impl Future for MyFuture {
-   type Output = u32;
-
-   fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<u32> {
-      Poll::Pending
-   }
-}
-
-fn iterator() -> impl Iterator {
-   std::iter::empty::<u32>()
-}
-
-fn future() -> impl Future {
-   MyFuture
-}
-
-fn square_fn_once() -> impl FnOnce(u32) -> u32 {
-   |x| x * x
-}
-
-fn square_fn_mut() -> impl FnMut(u32) -> u32 {
-   |x| x * x
-}
-
-fn square_fn() -> impl Fn(u32) -> u32 {
-   |x| x * x
-}
-
-fn main() {
-   iterator(); //~ ERROR unused implementer of `Iterator` that must be used
-   future(); //~ ERROR unused implementer of `Future` that must be used
-   square_fn_once(); //~ ERROR unused implementer of `FnOnce` that must be used
-   square_fn_mut(); //~ ERROR unused implementer of `FnMut` that must be used
-   square_fn(); //~ ERROR unused implementer of `Fn` that must be used
-}