about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2020-11-30 19:21:11 -0800
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2020-11-30 23:24:36 -0600
commitc40a8c1ecce6152fb2ad098a6f365245fbd3c1e0 (patch)
tree305b9ff1394694c393ecf8001ce949c8e8c80696
parent96ee060529b507c10d14015de42becbd9ff0f639 (diff)
downloadrust-c40a8c1ecce6152fb2ad098a6f365245fbd3c1e0.tar.gz
rust-c40a8c1ecce6152fb2ad098a6f365245fbd3c1e0.zip
Add negative impl test
-rw-r--r--tests/source/negative-impl.rs7
-rw-r--r--tests/target/negative-impl.rs14
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/source/negative-impl.rs b/tests/source/negative-impl.rs
new file mode 100644
index 00000000000..da242d4f3dc
--- /dev/null
+++ b/tests/source/negative-impl.rs
@@ -0,0 +1,7 @@
+impl ! Display for JoinHandle { }
+
+impl ! Box < JoinHandle > { }
+
+impl ! std :: fmt :: Display for JoinHandle < T : std :: future :: Future + std :: marker :: Send + std :: marker :: Sync > { }
+
+impl ! JoinHandle < T : std :: future :: Future < Output > + std :: marker :: Send + std :: marker :: Sync + 'static > + 'static { }
diff --git a/tests/target/negative-impl.rs b/tests/target/negative-impl.rs
new file mode 100644
index 00000000000..16ce7e26a99
--- /dev/null
+++ b/tests/target/negative-impl.rs
@@ -0,0 +1,14 @@
+impl !Display for JoinHandle {}
+
+impl !Box<JoinHandle> {}
+
+impl !std::fmt::Display
+    for JoinHandle<T: std::future::Future + std::marker::Send + std::marker::Sync>
+{
+}
+
+impl
+    !JoinHandle<T: std::future::Future<Output> + std::marker::Send + std::marker::Sync + 'static>
+        + 'static
+{
+}