Open
Description
union Bar<'a> {
v: Foo<'a>,
}
struct Foo<'a> { s: &'a u32 }
impl Copy for Foo<'static> {}
impl Clone for Foo<'static> { fn clone(&self) -> Self { *self } }
It seems to me that the above code should probably be rejected, since in general Foo<'a>
doesn't implement Copy in the above code.
The compiler check is checking for "is_copy_modulo_regions" specifically https://github.com/rust-lang/rust/blob/master/compiler/rustc_passes/src/stability.rs#L780, which seems like it probably shouldn't be modulo regions?