// Regression test for #79902 // Check that evaluation (which is used to determine whether to copy a type in // MIR building) evaluates bounds from normalizing an impl after evaluating // any bounds on the impl. // check-pass #![allow(drop_copy)] trait A { type B; } trait M {} struct G(*const T, *const U); impl Clone for G { fn clone(&self) -> Self { G { ..*self } } } impl Copy for G where T: A, U: A, { } impl A for () { type B = (); } fn is_m(_: T) {} fn main() { let x = G(&(), &()); drop(x); drop(x); }