You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: #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
0 commit comments