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: type aliases don't work with --remove-associated-types #531

Open
Nadrieril opened this issue Jan 21, 2025 · 0 comments
Open

Bug: type aliases don't work with --remove-associated-types #531

Nadrieril opened this issue Jan 21, 2025 · 0 comments
Labels
C-bug A bug in charon

Comments

@Nadrieril
Copy link
Member

Nadrieril commented Jan 21, 2025

Type aliases in rust are glorified macros: they are not checked for well-formedness and as such don't require the proper trait clauses to be in scope:

trait Trait { type Output; }
type Type<F> = <F as Trait>::Output;

This already requires hack today, but with --remove-associated-types it's worse. Solutions include:

  • Putting type aliases behind an option and error if both options are on;
  • Add the missing trait clauses automatically somehow.
@Nadrieril Nadrieril added the C-bug A bug in charon label Jan 21, 2025
@Nadrieril Nadrieril changed the title Bug: type aliases don't work with --remove-associated-type Bug: type aliases don't work with --remove-associated-types Jan 21, 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