by estebank · 3y ago · 0 comments
pub fn foo<T: AsRef<X>>(x: T) {
inner_foo(x.as_ref());
}
fn inner_foo(_: &X) { todo!() }
can be instead done by the compiler automatically (turning monomorphized code back into polymorphic code, hence the polimorphization hame).[1]: https://rustc-dev-guide.rust-lang.org/backend/monomorph.html...