-
Notifications
You must be signed in to change notification settings - Fork 0
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
associated_type_defaults
are unsound in the new solver
#46
Comments
85 tasks
This feels somewhat unsolvable until we fully enable coinductive trait goals and check impl where clauses instead of the current hack which disables alias bounds candidates for stuff proven via impls |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
fmease
added a commit
to fmease/rust
that referenced
this issue
May 30, 2024
…r=lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 31, 2024
…lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
May 31, 2024
…r=lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 31, 2024
Rollup merge of rust-lang#125786 - compiler-errors:fold-item-bounds, r=lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this issue
Jun 28, 2024
Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rust-lang/rust#110673 attempted to make alias bounds sound in the new solver by only assembling alias bounds for a projection (such as
<A as B>::C
) when the trait that the projection comes from (<A as B>
) can be satisfied via a param-env candidate.This is problematic when checking whether an associated type default is well-formed, because we assume within the trait that
Self: Trait<..>
holds.During
check_type_bounds
in the above program, we must prove:given the caller bounds of:
Which means that the check implemented in
EvalCtxt::validate_alias_bound_self_from_param_env
succeeds.The text was updated successfully, but these errors were encountered: