Add a way to decouple the implementation and the declaration of a TyCtxt method.#116052
Add a way to decouple the implementation and the declaration of a TyCtxt method.#116052bors merged 4 commits intorust-lang:masterfrom
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 |
WaffleLapkin
left a comment
There was a problem hiding this comment.
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.
WaffleLapkin
left a comment
There was a problem hiding this comment.
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.
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.
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.
What "faulty StableHash implementationt(s)" are you thinking about?
There was a problem hiding this comment.
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