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

Frontend: silence an error about escaping bounded variables #675

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented May 15, 2024

This PR:

  • fixes Frontend crash: escaping bound vars #495 by turning an error into a warning with some debugging context;
  • fixes another similar bug when a bound is universally quantified by a lifetime (See the tests introduced by the first commit. When comparing two predicates, we were not systematically erasing regions, causing a bound for<'a> Foo<&'a T> not being selected when looking for a Foo<&T>.).

@W95Psp W95Psp changed the title Fix issue #495 Frontend: silence an error about escaping bounded variables May 16, 2024
When `try_normalize_erasing_regions` fails, regions are not
erased. When comparing predicates, regions never matter: we need to
make sure they are erased (an erased lifetime will show up as `&`
instead of `&'named`).

Also, erased regions still show up in the binder: whence we skip it.

This commit does a last thing: instead of dealing with constness by
replacing in strings, we call `without_const`.
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

thanks

@W95Psp W95Psp added this pull request to the merge queue May 16, 2024
Merged via the queue into main with commit 455fbeb May 16, 2024
12 of 13 checks passed
@W95Psp W95Psp deleted the fix-495 branch May 16, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Frontend crash: escaping bound vars
2 participants