Skip to content

ICE: Placeholder const in deep rejection #10

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

Description

@compiler-errors
struct Wrapper<T, const N: usize>([T; N]);

trait Foo {}
fn needs_foo<F: Foo>() {}

impl<T> Foo for [T; 1] {}

fn test<T, const N: usize>() {
    needs_foo::<[T; N]>();
}
error: internal compiler error: compiler/rustc_middle/src/ty/fast_reject.rs:375:17: unexpected obl const: Const { ty: usize, kind: Placeholder(Placeholder { universe: U0, name: 0 }) }

We shouldn't ICE for placeholder consts here since we canonicalize parameters

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions