Skip to content

demiu/aoc regression - overflow too eagerly dropping constraints #201

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
compiler-errors opened this issue May 6, 2025 · 1 comment · Fixed by rust-lang/rust#140711
Closed
Assignees
Labels
A-overflow Having to do with overflow from-crater A regression found via a crater run, not part of our test suite

Comments

@compiler-errors
Copy link
Member

compiler-errors commented May 6, 2025

https://crater-reports.s3.amazonaws.com/pr-133502-11/try%2328f13ad7c79d80decb5a3d54595a8b4105f397a3/gh/Demiu.AoC2021/log.txt

trait Intersect<U> {
    type Output;
}

impl<T, U> Intersect<Vec<U>> for T
where
    T: Intersect<U>,
{
    type Output = T;
}

impl Intersect<Cuboid> for Cuboid {
    type Output = Cuboid;
}

fn intersect<T, U>(_: &T, _: &U) -> T::Output
where
    T: Intersect<U>,
{
    todo!()
}

struct Cuboid;
impl Cuboid {
    fn method(&self) {}
}

fn main() {
    let x = vec![];
    let y = intersect(&Cuboid, &x);
    y.method();
    let x: Vec<Cuboid> = x;
}
@compiler-errors compiler-errors self-assigned this May 6, 2025
@lcnr lcnr added A-overflow Having to do with overflow from-crater A regression found via a crater run, not part of our test suite labels May 6, 2025
@lcnr lcnr moved this from unknown to in progress in -Znext-solver=globally May 6, 2025
Zalathar added a commit to Zalathar/rust that referenced this issue May 8, 2025
…lcnr

Do not discard constraints on overflow if there was candidate ambiguity

Fixes rust-lang/trait-system-refactor-initiative#201.

There's a pretty chunky justification in the test.

r? lcnr
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 8, 2025
…lcnr

Do not discard constraints on overflow if there was candidate ambiguity

Fixes rust-lang/trait-system-refactor-initiative#201.

There's a pretty chunky justification in the test.

r? lcnr
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 8, 2025
Rollup merge of rust-lang#140711 - compiler-errors:combine-maybes, r=lcnr

Do not discard constraints on overflow if there was candidate ambiguity

Fixes rust-lang/trait-system-refactor-initiative#201.

There's a pretty chunky justification in the test.

r? lcnr
@lcnr
Copy link
Contributor

lcnr commented May 8, 2025

fixed by #140711

@lcnr lcnr closed this as completed May 8, 2025
@lcnr lcnr moved this from in progress to done in -Znext-solver=globally May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-overflow Having to do with overflow 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.

2 participants