2024-03-29 18:21:25 -05:00
|
|
|
trait Trait {
|
|
|
|
type RefTarget;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait for () where Missing: Trait {}
|
2024-04-30 22:59:33 -05:00
|
|
|
//~^ ERROR cannot find type `Missing` in this scope
|
|
|
|
//~| ERROR not all trait items implemented, missing: `RefTarget`
|
2024-03-29 18:21:25 -05:00
|
|
|
|
|
|
|
struct Other {
|
|
|
|
data: <() as Trait>::RefTarget,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
std::mem::transmute::<Option<()>, Option<&Other>>(None);
|
|
|
|
}
|
|
|
|
}
|