Skip to content

Commit 5fa665f

Browse files
authored
Rollup merge of #148261 - aDotInTheVoid:no-sync-for-smir, r=celinval
rustc_public: Make Id types !Send / !Sync These types are Id's to a table stored in TLS, so using them from another tread will either panic, or give wrong results. Therefor, I've added a ~~`ReferencesTls`~~`ThreadLocalIndex` marker type, which ensures types arn't `Send`/`Sync`. This is a breaking change for users of the `rustc_public` crate. ~~It also changes how `DefId` and similar are `Serialize`d. It would be possible to preserve the old behavior if that's needed, but I couldn't see any tests for these.~~ EDIT: Not anymore: rust-lang/rust#148261 (comment) Zulip Discussion: https://rust-lang.zulipchat.com/#narrow/channel/320896-project-stable-mir/topic/WDYM.20.22should.20not.20.20be.20shared.20across.20threads.22/with/547374171
2 parents 0bd23ee + 06a12a9 commit 5fa665f

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)