-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add a way to decouple the implementation and the declaration of a TyCtxt method. #116052
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, modulo the nit which I'm not sure makes sense
@rustbot author
The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with the CI failure fixed
6991b38
to
4ed4913
Compare
@bors r=WaffleLapkin |
use crate::ty::{Ty, TyCtxt}; | ||
use rustc_span::DUMMY_SP; | ||
|
||
macro_rules! declare_hooks { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have some docs in this file that explain hat a "hook" is and how it differs from a "query".
/// Tries to destructure an `mir::Const` ADT or array into its variant index | ||
/// and its field values. This should only be used for pretty printing. | ||
query try_destructure_mir_constant_for_diagnostics( | ||
key: (mir::ConstValue<'tcx>, Ty<'tcx>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So can we now remove the faulty StableHash implementation(s) that were previously needed to make this work as a query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What "faulty StableHash implementationt(s)" are you thinking about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the zulip, still don't get it 👍🏻
Also the "hash eq implies eq" is very scary...
☀️ Test successful - checks-actions |
Finished benchmarking commit (bf98263): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 632.772s -> 635.361s (0.41%) |
…affleLapkin Add a way to decouple the implementation and the declaration of a TyCtxt method. properly addresses rust-lang#115819 accepted MCP: rust-lang/compiler-team#395
We need to either backport this PR or just apply #115819 to beta without applying it to master |
properly addresses #115819
accepted MCP: rust-lang/compiler-team#395