// We used to allow erroneous `DispatchFromDyn` impls whose RHS type contained // fields that weren't ZSTs. I don't believe this was possible to abuse, but // it's at least nice to give users better errors. #![feature(arbitrary_self_types)] #![feature(unsize)] #![feature(dispatch_from_dyn)] use std::marker::Unsize; use std::ops::DispatchFromDyn; struct Dispatchable { _ptr: Box, z: Z, } impl DispatchFromDyn> for Dispatchable //~^ ERROR implementing `DispatchFromDyn` does not allow multiple fields to be coerced where T: Unsize + ?Sized, U: ?Sized, { } fn main() {}