#[derive(Clone)] struct S; trait X {} impl X for S {} fn foo(_: T) {} fn bar(s: &T) { foo(s); //~ ERROR the trait bound `&T: X` is not satisfied } fn bar_with_clone(s: &T) { foo(s); //~ ERROR the trait bound `&T: X` is not satisfied } fn main() { let s = &S; bar(s); }