Merged
Conversation
- Modified `InferCtxt::mk_trait_obligation_with_new_self_ty` to take as argument a `Binder<(TraitPredicate, Ty)>` instead of a `Binder<TraitPredicate>` and a separate `Ty` with no bound vars. - Modified all call places to avoid calling `Binder::no_bounds_var` or `Binder::skip_binder` when it is not safe.
jackh726
requested changes
May 17, 2022
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
jackh726
reviewed
May 17, 2022
Comment on lines
7
to
+8
| = help: the trait `Trait` is implemented for `&'a mut S` | ||
| = note: `for<'b> Trait` is implemented for `&'b mut S`, but not for `&'b S` |
Member
There was a problem hiding this comment.
This is less than ideal, but I think it should be left for a separate PR.
Contributor
Author
There was a problem hiding this comment.
Yeah, but I was not really able to understand why line 7 is printing only not satisfied trait and a different name for the lifetime from the one use in the code ('a instead of 'b) and note due to change is using binder and the same name for lifetime than the one in the code.
Member
|
@bors r+ |
Collaborator
|
📌 Commit ac5366b has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 18, 2022
Rollup of 6 pull requests Successful merges: - rust-lang#94639 (Suggest dereferencing non-lval mutable reference on assignment) - rust-lang#95979 (update coherence docs, fix generator + opaque type ICE) - rust-lang#96378 (Mention traits and types involved in unstable trait upcasting) - rust-lang#96917 (Make HashMap fall back to RtlGenRandom if BCryptGenRandom fails) - rust-lang#97101 (Add tracking issue for ExitCode::exit_process) - rust-lang#97123 (Clean fix for rust-lang#96223) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Okay, so here we are (hopefully) 👍
Closes #96223
Thanks a lot to @jackh726 for your help and explanation 🙏
Modified
InferCtxt::mk_trait_obligation_with_new_self_tyto take as argument aBinder<(TraitPredicate, Ty)>instead of aBinder<TraitPredicate>and a separateTywith no bound vars.Modified all call places to avoid calling
Binder::no_bounds_varorBinder::skip_binderwhen it is not safe.r? @jackh726