Skip to content

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

Closed
rust-lang/rust
#140711
@compiler-errors

Description

@compiler-errors

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;
}

Metadata

Metadata

Labels

A-overflowHaving to do with overflowfrom-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions