From c40a8c1ecce6152fb2ad098a6f365245fbd3c1e0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 30 Nov 2020 19:21:11 -0800 Subject: [PATCH] Add negative impl test --- tests/source/negative-impl.rs | 7 +++++++ tests/target/negative-impl.rs | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/source/negative-impl.rs create mode 100644 tests/target/negative-impl.rs 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 {} + +impl !std::fmt::Display + for JoinHandle +{ +} + +impl + !JoinHandle + std::marker::Send + std::marker::Sync + 'static> + + 'static +{ +}