Skip to content
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

Clean fix for #96223 #97123

Merged
merged 2 commits into from
May 18, 2022
Merged

Conversation

ricked-twice
Copy link
Contributor

@ricked-twice ricked-twice commented May 17, 2022

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_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.

r? @jackh726

- 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.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 17, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 17, 2022
@rust-log-analyzer

This comment has been minimized.

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`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is less than ideal, but I think it should be left for a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jackh726
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 17, 2022

📌 Commit ac5366b has been approved by jackh726

@bors 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 May 17, 2022
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
@bors bors merged commit a2c2720 into rust-lang:master May 18, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 18, 2022
@ricked-twice ricked-twice deleted the issue-96223-clean-fix branch May 23, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: trimmed_def_paths constructed, assertion failed: !new_self_ty.has_escaping_bound_vars()
6 participants