Description
On https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html#foreign-impls, CString, FromBytesUntilNulError, FromBytesWithNulError, FromVecWithNulError, IntoStringError, and NulError are considered "Implementations on Foreign Types", even though each of those types exists in std.
On stable (https://doc.rust-lang.org/stable/std/clone/trait.Clone.html#foreign-impls), those types are not considered "Implementations on Foreign Types."
I believe this is caused indirectly by 7f3cc2f (/cc @petrochenkov). That commit changed the export style for CString etc from pub use
to pub type CString = alloc::ffi::CString
.
However, this could also be considered a rustdoc bug. MCVE:
yarble.rs
pub struct Yarb;
pub struct Proust;
pub struct Dsug;
foo.rs
extern crate yarble;
pub trait Bar {}
impl Bar for yarble::Yarb{}
impl Bar for yarble::Proust{}
pub use yarble::Yarb;
pub type Proust = yarble::Proust;
pub type Dsug = yarble::Dsug;
impl Bar for Dsug{}
run:
rustc --crate-type lib yarble.rs && rm -r doc ; rustdoc -L . foo.rs && open doc/foo/trait.Bar.html
Expected result:
All three of Yarble, Dsug, and Proust are considered plain "Implementations".
Actual result:
Proust is considered an "Implementation on Foreign Type" (screenshot below).