Skip to content

The reason not to hide RustcInternal and Stable traits #110

@zjp-CN

Description

@zjp-CN

These two traits used to be public, while they are hidden in the doc.

The troubles are:

  • internal fn needs RustcInternal trait bound which doesn't have a direct definition to jump in.
  • RustcInternal becomes harder to search and understand:
    • Users will never be sure that types like DefId or Instance can be converted into the internal conterparts, unless they read the source code of RustcInternal and the implementations.
    • Being convertible to an internal item is an important property for these types, and should be reflected in the API doc of the types to help readers be aware of it.
  • The same troubles apply to the Stable case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions