Closed
Description
First reported in https://users.rust-lang.org/t/unexpected-behaviors-of-trait-bounds/12286/3
STR
pub trait Partial: Copy {
}
pub trait Complete: Partial {
}
impl<T> Partial for T where T: Complete {}
impl<T> Complete for T {}
fn copy<P: Partial>(p: P) -> (P, P) {
(p, p)
}
fn main() {
let (p, q) = copy("hello".to_string());
drop(p);
println!("{}", q);
}
cc @nikomatsakis - let's discuss this when you are back from vacation (unless @aturon can come up with a solution?)