Rename super_predicates_of
and similar queries to explicit_*
to note that they're not elaborated by compiler-errors · Pull Request #127045 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation7 Commits3 Checks7 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Rename:
super_predicates_of
->explicit_super_predicates_of
implied_predicates_of
->explicit_implied_predicates_of
supertraits_containing_assoc_item
->explicit_supertraits_containing_assoc_item
This makes it clearer that, unlike (for example) TyCtxt::super_traits_of, we don't automatically elaborate this set of predicates.
r? @lcnr or @oli-obk or someone from t-types idc
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Some changes occurred in src/tools/clippy
cc @rust-lang/clippy
@@ -2440,7 +2443,7 @@ impl<'tcx> TyCtxt<'tcx> { |
---|
/// Given the def_id of a Trait `trait_def_id` and the name of an associated item `assoc_name` |
/// returns true if the `trait_def_id` defines an associated item of name `assoc_name`. |
pub fn trait_may_define_assoc_item(self, trait_def_id: DefId, assoc_name: Ident) -> bool { |
self.super_traits_of(trait_def_id).any(|trait_did |
self.supertrait_def_ids(trait_def_id).any(|trait_did |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side-note: I kinda dislike that this is a method on TyCtxt
. It makes it look like a query, and it's not like the other elaborator-like which are functions in util::*
. :/
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I renamed this to supertrait_def_ids
since super_traits_of
makes it seem like it returns PolyTraitRef
s which it explicit does not.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hahaha renaming this made it clear that there were two methods in rustc_middle
that did the same -- I deduplicated them in a follow-up commit.
This comment has been minimized.
📌 Commit 1160eec has been approved by oli-obk
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request
Rename super_predicates_of
and similar queries to explicit_*
to note that they're not elaborated
Rename:
super_predicates_of
->explicit_super_predicates_of
implied_predicates_of
->explicit_implied_predicates_of
supertraits_containing_assoc_item
->explicit_supertraits_containing_assoc_item
This makes it clearer that, unlike (for example) TyCtxt::super_traits_of
, we don't automatically elaborate this set of predicates.
r? @lcnr
or @oli-obk
or someone from t-types idc
bors added a commit to rust-lang-ci/rust that referenced this pull request
…llaumeGomez
Rollup of 10 pull requests
Successful merges:
- rust-lang#123714 (Add test for fn pointer duplication.)
- rust-lang#124091 (Update AST validation module docs)
- rust-lang#126963 (Add basic Serde serialization capabilities to Stable MIR)
- rust-lang#127015 (Switch back
non_local_definitions
lint to allow-by-default) - rust-lang#127016 (docs: check if the disambiguator matches its suffix)
- rust-lang#127029 (Fix Markdown tables in platform-support.md)
- rust-lang#127032 (Enable const casting for
f16
andf128
) - rust-lang#127041 (Migrate
run-make/override-aliased-flags
tormake.rs
) - rust-lang#127045 (Rename
super_predicates_of
and similar queries toexplicit_*
to note that they're not elaborated) - rust-lang#127075 (rustc_data_structures: Explicitly check for 64-bit atomics support)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 9 pull requests
Successful merges:
- rust-lang#126822 (Bootstrap command refactoring: port more
Command
usages toBootstrapCmd
(step 2)) - rust-lang#126835 (Simplifications in match lowering)
- rust-lang#126953 (std: separate TLS key creation from TLS access)
- rust-lang#127045 (Rename
super_predicates_of
and similar queries toexplicit_*
to note that they're not elaborated) - rust-lang#127075 (rustc_data_structures: Explicitly check for 64-bit atomics support)
- rust-lang#127101 (remove redundant match statement from dataflow const prop)
- rust-lang#127102 (Rename fuchsia builder and bump Fuchsia)
- rust-lang#127103 (Move binder and polarity parsing into
parse_generic_ty_bound
) - rust-lang#127108 (unify
dylib
andbin_helpers
and createshared_helpers::parse_value_from_args
)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#127045 - compiler-errors:explicit, r=oli-obk
Rename super_predicates_of
and similar queries to explicit_*
to note that they're not elaborated
Rename:
super_predicates_of
->explicit_super_predicates_of
implied_predicates_of
->explicit_implied_predicates_of
supertraits_containing_assoc_item
->explicit_supertraits_containing_assoc_item
This makes it clearer that, unlike (for example) TyCtxt::super_traits_of
, we don't automatically elaborate this set of predicates.
r? @lcnr
or @oli-obk
or someone from t-types idc
flip1995 pushed a commit to flip1995/rust that referenced this pull request
Rename super_predicates_of
and similar queries to explicit_*
to note that they're not elaborated
Rename:
super_predicates_of
->explicit_super_predicates_of
implied_predicates_of
->explicit_implied_predicates_of
supertraits_containing_assoc_item
->explicit_supertraits_containing_assoc_item
This makes it clearer that, unlike (for example) TyCtxt::super_traits_of
, we don't automatically elaborate this set of predicates.
r? @lcnr
or @oli-obk
or someone from t-types idc
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.
Relevant to the rustdoc team, which will review and decide on the PR/issue.
The Rustc Trait System Refactor Initiative (-Znext-solver)