3 #![allow(unused_variables)]
4 // Tests that binary operators allow subtyping on both the LHS and RHS,
5 // and as such do not introduce unnecessarily strict lifetime constraints.
11 impl<'a> Add<&'a Foo> for &'a Foo {
13 fn add(self, rhs: &'a Foo) {}
16 fn try_to_add(input: &Foo) {
19 // Manual reborrow worked even with invariant trait search.
22 // Direct use of the reference on the LHS requires additional
23 // subtyping before searching (invariantly) for `LHS: Add<RHS>`.