Skip to content

Sized trait should have #[doc(alias = "?")] #101267

Closed
@Zalathar

Description

@Zalathar
Contributor

Summary

Typing ? into the standard library’s search field shows aliased links to the Try trait (and the old try! macro), but there is no link to the Sized trait, which frequently appears as ?Sized in generic type bounds.

This could be a way to lead some users towards the documentation for this unusual use of the question mark character in trait-bound syntax.

Inspired by this reddit comment, since it turns out that the current docs would not have helped that person find their answer.

Activity

added
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
on Sep 1, 2022
GuillaumeGomez

GuillaumeGomez commented on Sep 21, 2022

@GuillaumeGomez
Member

I opened #102102 to fix this. I also added ?Sized as a doc alias.

added a commit that references this issue on Sep 22, 2022

Rollup merge of rust-lang#102102 - GuillaumeGomez:doc-aliases-sized-t…

15b4788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @GuillaumeGomez@Zalathar

      Issue actions

        `Sized` trait should have `#[doc(alias = "?")]` · Issue #101267 · rust-lang/rust