Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRusttrait coherence and orphan ruleSingle-choice MCQ

Which of these `impl` blocks, written in a downstream crate where `Vec`, `Display`, and `From` come from std and `MyType` is local, is REJECTED by the orphan rule?

// std types: Vec<T>, Box<T>, From, Display // local type: struct MyType; // A: impl From<MyType> for Vec<u8> { /* ... */ } // B: impl From<Vec<u8>> for MyType { /* ... */ } // C: impl Display for MyType { /* ... */ } // D: impl<T> From<MyType> for Box<T> { /* ... */ }