forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#137744 - skius:master, r=Nadrieril
Re-add `Clone`-derive on `Thir` This PR adds back `Clone` for `Thir`. If a tool wants to access a `thir_body` query result in the `Callbacks::after_analysis` hook, it can't do so (I think) without a `Clone` impl on `Thir`, because `check_unsafety` steals the value. With `Clone`, the `thir_body` query provider can be overriden to cache a clone of the `Thir`, circumventing that issue. Specifically, we need it for https://github.com/rust-corpus/qrates, [here](https://github.com/skius/qrates/blob/ca7a2301968a43862f2c04daffed71a9de8c333c/extractor/src/lib.rs#L205). Please let me know if there are issues with this PR/if there's another way to solve the problem at hand
- Loading branch information
Showing
1 changed file
with
25 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters