Skip to content

in nightly, std::thread_local! uses unreachable! where it needs to say $crate::unreachable! #95533

Closed
@elidupree

Description

@elidupree

Commit 36c9045 introduced two lines that say unreachable!(), which breaks this code (playground):

#![no_implicit_prelude]
::std::thread_local! {static Q: () = (); }

I believe they need to say $crate::unreachable! instead.

Also, if there isn't one already, we should create a regression test for this - #![no_implicit_prelude] seems easy to break by accident.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-libsRelevant to the library 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