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

Is the folding strategy in check_type_bound sufficient? #116

Open
compiler-errors opened this issue May 30, 2024 · 0 comments
Open

Is the folding strategy in check_type_bound sufficient? #116

compiler-errors opened this issue May 30, 2024 · 0 comments

Comments

@compiler-errors
Copy link
Member

compiler-errors commented May 30, 2024

rust-lang/rust#125786 folds associated type bounds to replace associated types w/ their concrete types. However, it only does it for identity-substituted associated types, and only for the associated type that we're checking.

This seems to be sufficient, but I'm somewhat suspicious about things like:

type Assoc<T>: Bound<Self::Assoc<u32>>;
type Assoc: Bound<Self::Other>;
type Other: ...;

We should revisit this strategy and convince ourselves it's sound before stabilization, or else make it more general (which doesn't seem too difficult).

Previous unsoundnesses:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant