-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make all thir types implement clone #96226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
I don't know what invariants THIR is supposed to have and why it's not If the |
r? @b-naber |
Ok. |
@bors r+ rollup |
📌 Commit eed91ee has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (41ef767): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
This PR adds
Clone
impl to all of theThir<'tcx>
types.I would like to be able to clone a
Thir
body so that I can make a copy in my rustc driver without breaking further compilation. Without this my driver is forced to run in theafter_expansion
callback and thus doesn't benefit from running all the safety checks thatrustc
usually does, instead i need to do them all myself.