Rename trait DepNodeParams to DepNodeKey#152033
Rename trait DepNodeParams to DepNodeKey#152033rust-bors[bot] merged 4 commits intorust-lang:mainfrom
DepNodeParams to DepNodeKey#152033Conversation
This comment has been minimized.
This comment has been minimized.
ef8a3e3 to
8ce45c3
Compare
This comment has been minimized.
This comment has been minimized.
8ce45c3 to
4429f09
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
| pub trait DepNodeKey<Tcx: DepContext>: fmt::Debug + Sized { | ||
| fn fingerprint_style() -> FingerprintStyle; | ||
|
|
||
| /// This method turns the parameters of a DepNodeConstructor into an opaque |
There was a problem hiding this comment.
Heh, DepNodeConstructor no longer exists
| /// | ||
| /// Not all `DepNodeKey` impls support being turned into a `Fingerprint` | ||
| /// (they don't need to if the corresponding `DepNode` is anonymous). | ||
| fn to_fingerprint(&self, _: Tcx) -> Fingerprint { |
There was a problem hiding this comment.
How does this default method interact with the default to_finger_print method in the blanket impl below? Seems like we have two defaults, and I honestly don't know how this is treated.
There was a problem hiding this comment.
I'm not sure either.
The blanket impl also has a HashStable bound, so maybe the trait-default is used for explicit impls on types that aren't HashStable?
I also noticed that removing the default body from the trait doesn't seem to cause any compile errors, so maybe it's not being used?
There was a problem hiding this comment.
The output of this program is default 2.
![allow(incomplete_features)]
#![feature(specialization)]
trait Blah {
fn f() {
eprintln!("default 1");
}
}
impl<T> Blah for T {
default fn f() {
eprintln!("default 2");
}
}
fn main() {
u32::f();
}I think you can remove the panicking default in the trait definition.
There was a problem hiding this comment.
Normally I try to refrain from “functional” changes in renaming PRs (to make review and archaology easier), but this seems innocent enough, and if we're right then it doesn't change any actual behaviour.
There was a problem hiding this comment.
I think commit boundaries are more important than PR boundaries for this kind of thing. So we are good here.
There don't appear to be any trait impls relying on this default body.
|
@bors r+ |
Rename trait `DepNodeParams` to `DepNodeKey` In query system plumbing, we usually refer to a query's explicit argument value as a “key”. The first few commits do some preliminary cleanup that would conflict with the rename; the rename itself is in the final commit. r? nnethercote (or compiler)
Rollup of 15 pull requests Successful merges: - #151431 (Add new unstable attribute: `#[export_visibility = ...]`.) - #146900 (Add avr_target_feature) - #152033 (Rename trait `DepNodeParams` to `DepNodeKey`) - #152142 (Convert to inline diagnostics in `rustc_hir_typeck`) - #152020 (Remove dummy loads on offload codegen) - #152023 (Some `rustc_query_system` cleanups) - #152068 (Convert to inline diagnostics in `rustc_resolve`) - #152081 (Port depgraph testing attributes to parser) - #152090 (Port reexport_test_harness_main to attr parser) - #152105 (Convert to inline diagnostics in `rustc_ast_lowering`) - #152108 (Convert to inline diagnostics in `rustc_expand`) - #152114 (Convert to inline diagnostics in `rustc_mir_transform`) - #152115 (Convert to inline diagnostics in `rustc_metadata`) - #152116 (Remove rustdoc GUI flaky test) - #152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD) Failed merges: - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`) - #152106 (Convert to inline diagnostics in `rustc_ast_passes`) - #152109 (Convert to inline diagnostics in `rustc_errors`) - #152117 (Convert to inline diagnostics in `rustc_trait_selection`) - #152118 (Convert to inline diagnostics in `rustc_codegen_ssa`) - #152119 (Convert to inline diagnostics in `rustc_middle`) - #152126 (Convert to inline diagnostics in `rustc_mir_build`) - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
Rename trait `DepNodeParams` to `DepNodeKey` In query system plumbing, we usually refer to a query's explicit argument value as a “key”. The first few commits do some preliminary cleanup that would conflict with the rename; the rename itself is in the final commit. r? nnethercote (or compiler)
Rename trait `DepNodeParams` to `DepNodeKey` In query system plumbing, we usually refer to a query's explicit argument value as a “key”. The first few commits do some preliminary cleanup that would conflict with the rename; the rename itself is in the final commit. r? nnethercote (or compiler)
Rollup of 19 pull requests Successful merges: - #146900 (Add avr_target_feature) - #150379 (Return `ExitCode` from `rustc_driver::main` instead of calling `process::exit`) - #152033 (Rename trait `DepNodeParams` to `DepNodeKey`) - #152142 (Convert to inline diagnostics in `rustc_hir_typeck`) - #152145 (Disable flaky test `oneshot::recv_timeout_before_send`) - #152020 (Remove dummy loads on offload codegen) - #152023 (Some `rustc_query_system` cleanups) - #152068 (Convert to inline diagnostics in `rustc_resolve`) - #152081 (Port depgraph testing attributes to parser) - #152090 (Port reexport_test_harness_main to attr parser) - #152105 (Convert to inline diagnostics in `rustc_ast_lowering`) - #152108 (Convert to inline diagnostics in `rustc_expand`) - #152110 (Fix incorrect RSS on systems with non-4K page size) - #152111 (bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default) - #152114 (Convert to inline diagnostics in `rustc_mir_transform`) - #152115 (Convert to inline diagnostics in `rustc_metadata`) - #152116 (Remove rustdoc GUI flaky test) - #152118 (Convert to inline diagnostics in `rustc_codegen_ssa`) - #152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD) Failed merges: - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`) - #152106 (Convert to inline diagnostics in `rustc_ast_passes`) - #152109 (Convert to inline diagnostics in `rustc_errors`) - #152117 (Convert to inline diagnostics in `rustc_trait_selection`) - #152119 (Convert to inline diagnostics in `rustc_middle`) - #152126 (Convert to inline diagnostics in `rustc_mir_build`) - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
…uwer Rollup of 18 pull requests Successful merges: - #150379 (Return `ExitCode` from `rustc_driver::main` instead of calling `process::exit`) - #152033 (Rename trait `DepNodeParams` to `DepNodeKey`) - #152142 (Convert to inline diagnostics in `rustc_hir_typeck`) - #152145 (Disable flaky test `oneshot::recv_timeout_before_send`) - #152020 (Remove dummy loads on offload codegen) - #152023 (Some `rustc_query_system` cleanups) - #152068 (Convert to inline diagnostics in `rustc_resolve`) - #152081 (Port depgraph testing attributes to parser) - #152090 (Port reexport_test_harness_main to attr parser) - #152105 (Convert to inline diagnostics in `rustc_ast_lowering`) - #152108 (Convert to inline diagnostics in `rustc_expand`) - #152110 (Fix incorrect RSS on systems with non-4K page size) - #152111 (bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default) - #152114 (Convert to inline diagnostics in `rustc_mir_transform`) - #152115 (Convert to inline diagnostics in `rustc_metadata`) - #152116 (Remove rustdoc GUI flaky test) - #152118 (Convert to inline diagnostics in `rustc_codegen_ssa`) - #152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD) Failed merges: - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`) - #152106 (Convert to inline diagnostics in `rustc_ast_passes`) - #152109 (Convert to inline diagnostics in `rustc_errors`) - #152117 (Convert to inline diagnostics in `rustc_trait_selection`) - #152119 (Convert to inline diagnostics in `rustc_middle`) - #152126 (Convert to inline diagnostics in `rustc_mir_build`) - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
Rollup merge of #152033 - Zalathar:dep-node-key, r=nnethercote Rename trait `DepNodeParams` to `DepNodeKey` In query system plumbing, we usually refer to a query's explicit argument value as a “key”. The first few commits do some preliminary cleanup that would conflict with the rename; the rename itself is in the final commit. r? nnethercote (or compiler)
…uwer Rollup of 18 pull requests Successful merges: - rust-lang/rust#150379 (Return `ExitCode` from `rustc_driver::main` instead of calling `process::exit`) - rust-lang/rust#152033 (Rename trait `DepNodeParams` to `DepNodeKey`) - rust-lang/rust#152142 (Convert to inline diagnostics in `rustc_hir_typeck`) - rust-lang/rust#152145 (Disable flaky test `oneshot::recv_timeout_before_send`) - rust-lang/rust#152020 (Remove dummy loads on offload codegen) - rust-lang/rust#152023 (Some `rustc_query_system` cleanups) - rust-lang/rust#152068 (Convert to inline diagnostics in `rustc_resolve`) - rust-lang/rust#152081 (Port depgraph testing attributes to parser) - rust-lang/rust#152090 (Port reexport_test_harness_main to attr parser) - rust-lang/rust#152105 (Convert to inline diagnostics in `rustc_ast_lowering`) - rust-lang/rust#152108 (Convert to inline diagnostics in `rustc_expand`) - rust-lang/rust#152110 (Fix incorrect RSS on systems with non-4K page size) - rust-lang/rust#152111 (bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default) - rust-lang/rust#152114 (Convert to inline diagnostics in `rustc_mir_transform`) - rust-lang/rust#152115 (Convert to inline diagnostics in `rustc_metadata`) - rust-lang/rust#152116 (Remove rustdoc GUI flaky test) - rust-lang/rust#152118 (Convert to inline diagnostics in `rustc_codegen_ssa`) - rust-lang/rust#152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD) Failed merges: - rust-lang/rust#152070 (Convert to inline diagnostics in `rustc_pattern_analysis`) - rust-lang/rust#152106 (Convert to inline diagnostics in `rustc_ast_passes`) - rust-lang/rust#152109 (Convert to inline diagnostics in `rustc_errors`) - rust-lang/rust#152117 (Convert to inline diagnostics in `rustc_trait_selection`) - rust-lang/rust#152119 (Convert to inline diagnostics in `rustc_middle`) - rust-lang/rust#152126 (Convert to inline diagnostics in `rustc_mir_build`) - rust-lang/rust#152131 (Port rustc_no_implicit_bounds attribute to parser.)
In query system plumbing, we usually refer to a query's explicit argument value as a “key”.
The first few commits do some preliminary cleanup that would conflict with the rename; the rename itself is in the final commit.
r? nnethercote (or compiler)