diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.rs | 10 |
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() {} |