Skip to content

Strange impl Freeze for *const T is !null in core with pattern types #150889

@BD103

Description

@BD103

If you look at std::marker::Freeze's implementors, you see the following:

impl<T> Freeze for *const T is !null

If you look at core::marker::Freeze's implementors, however, it is not the same:

impl<T: PointeeSized> Freeze for *const T is TyPat { hir_id: HirId(DefId(0:10799 ~ core[c274]::pat::{impl#4}).12), kind: NotNull, span: library/core/src/pat.rs:89:67: 89:72 (#0) }

These are the exact same impl blocks (the source link points to the same location), just one is rendered in std's docs and the other is rendered in core's docs.

There's something wrong with how core is rendering the trait implementation for the pattern type, because TyPat { hir_id: HirId(DefId(0:10799 ~ core[c274]::pat::{impl#4}).12), kind: NotNull, span: library/core/src/pat.rs:89:67: 89:72 (#0) } is internal compiler information that shouldn't be exposed to the user.

This issue only appears to be happening in core's documentation. I've found it in the docs for:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.F-pattern_types`#![feature(pattern_types)]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions