Open
Description
The following fails to compile:
trait Trait {}
fn takes_ref(t: &Trait) {}
fn takes_box(t: Box<Trait>) {
takes_ref(&t)
}
fn main() { }
with
<anon>:5:15: 5:17 error: the trait `Trait` is not implemented for the type `Box<Trait>` [E0277]
<anon>:5 takes_ref(&t)
^~
despite the Deref
implementation here.
I believe this should work based on the RFC.