Skip to content

rustdoc should use fully-qualified names sometimes #2004

@mark-i-m

Description

@mark-i-m

Suggestion: rustdoc should use fully-qualified names for anything not declared in the documented crate.

Here is an example from Tokio that I just came across:

pub trait ServerProto<T: 'static>: 'static {
    type Request: 'static;
    type Response: 'static;
    type Transport: 'static + Stream<Item=Self::Request, Error=Error> + Sink<SinkItem=Self::Response, SinkError=Error>;
    type BindTransport: IntoFuture<Item=Self::Transport, Error=Error>;
    fn bind_transport(&self, io: T) -> Self::BindTransport;
}

Notice the <Error=Error> parts? I propose that they should be fully-qualified as <Error=std::io::Error>, which is a lot clearer, IMHO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-docRelevant to the documentation team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions