Skip to content

rustdoc replaces aliases used as trait type parameters #83675

Closed
@tspiteri

Description

@tspiteri
use std::os::raw::c_long;

pub struct S(c_long);

impl From<c_long> for S {
    fn from(i: c_long) -> S { S(i) }
}

The documentation for the S trait implementations looks like this:

image

While the from function itself is documented correctly to take a parameter of type c_long, the From trait has type parameter i64 instead of c_long. I expected it to be impl From<c_long> for S instead.

Meta

rustc +nightly --version:

rustc 1.53.0-nightly (4a20eb6a9 2021-03-28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions