// run-pass #![feature(unsize, dispatch_from_dyn, never_type)] #![allow(dead_code)] use std::{ ops::DispatchFromDyn, marker::{Unsize, PhantomData}, }; struct Zst; struct NestedZst(PhantomData<()>, Zst); struct WithUnit(Box, ()); impl DispatchFromDyn> for WithUnit where T: Unsize {} struct WithPhantom(Box, PhantomData<()>); impl DispatchFromDyn> for WithPhantom where T: Unsize {} struct WithNever(Box, !); impl DispatchFromDyn> for WithNever where T: Unsize {} struct WithZst(Box, Zst); impl DispatchFromDyn> for WithZst where T: Unsize {} struct WithNestedZst(Box, NestedZst); impl DispatchFromDyn> for WithNestedZst where T: Unsize {} struct Generic(Box, A); impl DispatchFromDyn> for Generic where T: Unsize {} impl DispatchFromDyn>> for Generic> where T: Unsize {} impl DispatchFromDyn> for Generic where T: Unsize {} impl DispatchFromDyn> for Generic where T: Unsize {} impl DispatchFromDyn> for Generic where T: Unsize {} fn main() {}