Skip to content

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

Closed

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.

Activity

  1. added
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    on Apr 1, 2022
  2. added 2 commits that reference this issue on Apr 1, 2022
  3. added a commit that references this issue on Apr 2, 2022
  4. niluxv commented on Apr 2, 2022

    @niluxv
    Contributor

    Fixed by #95557, now merged into master so this can be closed I think.

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

    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