summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs')
-rw-r--r--tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs
new file mode 100644
index 000000000..742537ffc
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs
@@ -0,0 +1,10 @@
+#![feature(return_position_impl_trait_in_trait)]
+
+struct Wrapper<G: Send>(G);
+
+trait Foo {
+ fn bar() -> Wrapper<impl Sized>;
+ //~^ ERROR `impl Sized` cannot be sent between threads safely
+}
+
+fn main() {}