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