-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Cleanup: Replace item names referencing GitHub issues or error codes with something more meaningful #124356
Conversation
Some changes occurred in match checking cc @Nadrieril |
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 after nits
thanks ❤️
@@ -846,8 +846,10 @@ rustc_queries! { | |||
separate_provide_extern | |||
} | |||
|
|||
query issue33140_self_ty(key: DefId) -> Option<ty::EarlyBinder<ty::Ty<'tcx>>> { | |||
desc { |tcx| "computing Self type wrt issue #33140 `{}`", tcx.def_path_str(key) } | |||
query self_ty_of_trait_impl_enabling_order_dep_trait_object_exploit( |
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.
query self_ty_of_trait_impl_enabling_order_dep_trait_object_exploit( | |
query self_ty_of_trait_impl_enabling_order_dep_trait_object_hack( |
I think exploit is not a good fithere 🤔
compiler/rustc_ty_utils/src/ty.rs
Outdated
#[instrument(level = "debug", skip_all)] | ||
fn self_ty_of_trait_impl_enabling_order_dep_trait_object_exploit( | ||
tcx: TyCtxt<'_>, | ||
def_id: DefId, | ||
) -> Option<EarlyBinder<Ty<'_>>> { | ||
debug!(?def_id); |
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.
#[instrument(level = "debug", skip_all)] | |
fn self_ty_of_trait_impl_enabling_order_dep_trait_object_exploit( | |
tcx: TyCtxt<'_>, | |
def_id: DefId, | |
) -> Option<EarlyBinder<Ty<'_>>> { | |
debug!(?def_id); | |
#[instrument(level = "debug", skip(tcx))] | |
fn self_ty_of_trait_impl_enabling_order_dep_trait_object_exploit( | |
tcx: TyCtxt<'_>, | |
def_id: DefId, | |
) -> Option<EarlyBinder<Ty<'_>>> { |
was there a reason you didn't do this?
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.
Yeah, I did that intentionally. There's a minor difference. If I just add it to the tracing
span via #[instrument]
, the DefId
doesn't get logged right away but only together with each debug!
(and for context it wouldn't get logged at all if we didn't reach any debug!
which won't be the case here).
I'm gonna check the actual output later since my knowledge is based on experiments I did in the past with the default tracing_subscriber
setup and see how it actually fares in practice.
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.
Output with #[instrument(skip_all)]
& debug!(?def_id)
:
│ │ │ ├─┐rustc_ty_utils::ty::self_ty_of_trait_impl_enabling_order_dep_trait_object_hack
│ │ │ │ ├─ 0ms DEBUG rustc_ty_utils::ty def_id=DefId(0:5 ~ lint_incoherent_auto_trait_objects[0a81]::{impl#1})
│ │ │ │ ├─ 0ms DEBUG rustc_ty_utils::ty trait_ref=<(dyn std::marker::Send + 'static) as Foo>
│ │ │ │ ├─ 0ms DEBUG rustc_ty_utils::ty MATCHES!
│ │ │ ├─┘
Output with #[instrument(skip(tcx)]
& no debug call:
│ │ │ ├─┐rustc_ty_utils::ty::self_ty_of_trait_impl_enabling_order_dep_trait_object_hack def_id=DefId(0:5 ~ lint_incoherent_auto_trait_objects[0a81]::{impl#1})
│ │ │ │ ├─ 0ms DEBUG rustc_ty_utils::ty trait_ref=<(dyn std::marker::Send + 'static) as Foo>
│ │ │ │ ├─ 0ms DEBUG rustc_ty_utils::ty MATCHES!
│ │ │ ├─┘
Yeah, okay, in this case it doesn't matter. Taking your suggested approach.
This comment was marked as resolved.
This comment was marked as resolved.
c7ebe19
to
2a1d748
Compare
@bors r=lcnr rollup |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f5355b9): 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: 673.884s -> 672.879s (-0.15%) |
lcnr in #117164 (review):
I've grepped through
compiler/
like crazy and think that I've found all instances of this pattern.However, I haven't renamed
compute_2229_migrations_*
. Should I?The first commit introduces an abhorrent and super long name for an item because naming is hard but also scary looking / unwelcoming names are good for things related to temporary-ish backcompat hacks. I'll let you discover it by yourself.
Contains a bit of drive-by cleanup and a diag migration bc that was the simplest option.
r? lcnr or compiler