mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
23 lines
324 B
Rust
23 lines
324 B
Rust
// 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() {}
|