diff options
Diffstat (limited to 'tests/ui/coherence/issue-99663-2.rs')
-rw-r--r-- | tests/ui/coherence/issue-99663-2.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/coherence/issue-99663-2.rs b/tests/ui/coherence/issue-99663-2.rs new file mode 100644 index 000000000..10a0a5688 --- /dev/null +++ b/tests/ui/coherence/issue-99663-2.rs @@ -0,0 +1,22 @@ +// check-pass + +#![feature(type_alias_impl_trait)] + +struct Outer<T: ?Sized> { + i: InnerSend<T>, +} + +type InnerSend<T: ?Sized> = impl Send; + +fn constrain<T: ?Sized>() -> InnerSend<T> { + () +} + +trait SendMustNotImplDrop {} + +#[allow(drop_bounds)] +impl<T: ?Sized + Send + Drop> SendMustNotImplDrop for T {} + +impl<T: ?Sized> SendMustNotImplDrop for Outer<T> {} + +fn main() {} |