Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document direct implementations on type aliases. #42027

Merged
merged 1 commit into from
Jun 9, 2017
Merged

Document direct implementations on type aliases. #42027

merged 1 commit into from
Jun 9, 2017

Commits on Jun 9, 2017

  1. Document direct implementations on type aliases.

    This improves #32077, but is not a complete fix. For a type alias `type
    NewType = AliasedType`, it will include any `impl NewType` and `impl
    Trait for NewType` blocks in the documentation for `NewType`.
    
    A complete fix would include the implementations from the aliased type
    in the type alias' documentation, so that users have a complete
    picture of methods that are available on the alias. However, to do this
    properly would require a fix for #14072, as the alias may affect the
    type parameters of the type alias, making the documentation difficult to
    understand. (That is, for `type Result = std::result::Result<(), ()>` we
    would ideally show documentation for `impl Result<(), ()>`, rather than
    generic documentation for `impl<T, E> Result<T, E>`).
    
    I think this improvement is worthwhile, as it exposes implementations
    which are not currently documented by rustdoc. The documentation for the
    implementations on the aliased type are still accessible by clicking
    through to the docs for that type. (Although perhaps it's now less
    obvious to the user that they should click-through to get there).
    mjkillough committed Jun 9, 2017
    Configuration menu
    Copy the full SHA
    2da3501 View commit details
    Browse the repository at this point in the history