Closed
Description
I tried this code:
use std::convert::AsRef;
pub struct Gus;
impl AsRef<str> for Gus {
fn as_ref(&self) -> &str {
todo!()
}
}
impl AsRef<Gus> for str {
fn as_ref(&self) -> &Gus {
todo!()
}
}
Meta
stable: rustc 1.50.0 (cb75ad5db 2021-02-10)
nightly: rustc 1.52.0-nightly (d1206f950 2021-02-15)
but this also affects whatever nightly docs.rs is on (https://docs.rs/camino/1.0.0/camino/struct.Utf8Path.html#impl-AsRef%3Cstr%3E is missing the for str
impl
(separately, I hit rust-lang/cargo#6783 when testing this, where cargo +stable doc --open
still used the nightly generated code)