Skip to content

Folding anon consts in param_env query can lead to ambiguity #213

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

Description

@compiler-errors
trait Trait: Deref<Target = [u8; { 1 + 1 }]> {}

When elaborating param env for Trait, we have Self: Trait, Self: Deref<Target = [u8; {anon const}]>. We fold anon consts away before elaborating. However, we end up getting another un-folded copy of the anon const from elaborating Self: Trait. This leads to ambiguity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from-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