Skip to content

breakage due to incompletely constraining gat args #202

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

Closed
lcnr opened this issue May 6, 2025 · 0 comments · Fixed by rust-lang/rust#140712
Closed

breakage due to incompletely constraining gat args #202

lcnr opened this issue May 6, 2025 · 0 comments · Fixed by rust-lang/rust#140712
Assignees
Labels
from-crater A regression found via a crater run, not part of our test suite

Comments

@lcnr
Copy link
Contributor

lcnr commented May 6, 2025

might be the cause behind the breakage in deptypes, but I am not sure about that

trait Trait {
    type Assoc<U>;
}

impl<T> Trait for T {
    type Assoc<U> = U;
}

fn ret<T: Trait, U>(x: U) -> <T as Trait>::Assoc<U> {
    loop {}
}

fn foo<T: Trait<Assoc<u32> = u32>, U>() {
    let inf = Default::default();
    let x = ret::<T, _>(inf);
    let _: i32 = inf;
}
@lcnr lcnr added the from-crater A regression found via a crater run, not part of our test suite label May 6, 2025
@lcnr lcnr moved this to in progress in -Znext-solver=globally May 6, 2025
@lcnr lcnr self-assigned this May 6, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 15, 2025
…piler-errors

normalization: avoid incompletely constraining GAT args

We need to copy the behavior of rust-lang#125214 in the new solver. This fixes rust-lang/trait-system-refactor-initiative#202 which seems to be the cause of the regression in `deptypes`.

r? `@compiler-errors`
compiler-errors added a commit to compiler-errors/rust that referenced this issue May 15, 2025
…piler-errors

normalization: avoid incompletely constraining GAT args

We need to copy the behavior of rust-lang#125214 in the new solver. This fixes rust-lang/trait-system-refactor-initiative#202 which seems to be the cause of the regression in `deptypes`.

r? ``@compiler-errors``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 16, 2025
Rollup merge of rust-lang#140712 - lcnr:normalization-gat-args, r=compiler-errors

normalization: avoid incompletely constraining GAT args

We need to copy the behavior of rust-lang#125214 in the new solver. This fixes rust-lang/trait-system-refactor-initiative#202 which seems to be the cause of the regression in `deptypes`.

r? ```@compiler-errors```
@lcnr lcnr moved this from in progress to done in -Znext-solver=globally May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from-crater A regression found via a crater run, not part of our test suite
Projects
Development

Successfully merging a pull request may close this issue.

1 participant