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

Bug: Trait resolution is unsound in the presence of bound lifetimes #584

Open
Nadrieril opened this issue Mar 7, 2025 · 0 comments
Open
Labels
C-bug A bug in charon

Comments

@Nadrieril
Copy link
Member

To simplify the handling of lifetime binders, our trait resolution algorithm currently erases all lifetime information, even bound lifetimes such as in for<'a> fn(&'a ()). This actually matters because types that differ in bound lifetimes are distinct for the purposes of trait solving, so we're identifying distinct types.

This is unlikely to happen in practice but technically unsound. Reproducer welcome if someone can come up with one.

@Nadrieril Nadrieril added the C-bug A bug in charon label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug A bug in charon
Projects
None yet
Development

No branches or pull requests

1 participant