Minor tweaks to compare_impl_item.rs#131979
Conversation
compare_impl_item.rs
This comment has been minimized.
This comment has been minimized.
compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs
Outdated
Show resolved
Hide resolved
a844b11 to
7daa9f2
Compare
fmease
left a comment
There was a problem hiding this comment.
6/7 suggestions are for preexisting warts. Would be cool if you could incorporate them in this PR but it's not a must :^).
otherwise r=me
| let trait_to_placeholder_args = | ||
| impl_to_placeholder_args.rebase_onto(tcx, impl_m.container_id(tcx), trait_to_impl_args); | ||
| debug!("compare_impl_method: trait_to_placeholder_args={:?}", trait_to_placeholder_args); | ||
| let trait_to_impl_args = GenericArgs::identity_for_item(tcx, impl_m.def_id).rebase_onto( |
There was a problem hiding this comment.
(preexisting) wouldn't impl_m_args or impl_item_args be a better fit over trait_to_impl_args? the trait args aren't actually involved
There was a problem hiding this comment.
I think that would be confusing because after this renaming, we'd be instantiating impl_m_predicates with identity args, and trait_m_predicates with impl_m_args...
There was a problem hiding this comment.
I frankly think that trait_to_impl args is the right name; it's the set of arguments being used to map things parameterized over the trait method's args to the impl method.
7daa9f2 to
21d95fb
Compare
|
I don't agree with the name change, so I haven't addressed it. I changed a bunch of debugs with their more tracing-native variants. @rustbot ready |
|
Makes sense, thanks! |
…l, r=fmease Minor tweaks to `compare_impl_item.rs` 1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it. 2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
…l, r=fmease Minor tweaks to `compare_impl_item.rs` 1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it. 2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
…l, r=fmease Minor tweaks to `compare_impl_item.rs` 1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it. 2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
Rollup of 9 pull requests Successful merges: - rust-lang#130991 (Vectorized SliceContains) - rust-lang#131928 (rustdoc: Document `markdown` module.) - rust-lang#131955 (Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64) - rust-lang#131979 (Minor tweaks to `compare_impl_item.rs`) - rust-lang#132036 (Add a test case for rust-lang#131164) - rust-lang#132039 (Specialize `read_exact` and `read_buf_exact` for `VecDeque`) - rust-lang#132060 ("innermost", "outermost", "leftmost", and "rightmost" don't need hyphens) - rust-lang#132065 (Clarify documentation of `ptr::dangling()` function) - rust-lang#132066 (Fix a typo in documentation of `pointer::sub_ptr()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131979 - compiler-errors:compare-pred-entail, r=fmease Minor tweaks to `compare_impl_item.rs` 1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it. 2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
InstantiatedPredicatesstruct forhybrid_predsincompare_impl_item.rs, since we never actually push anything into thespanspart of it.instantiate_identity.