Skip to content

pattern types escaping bound vars ICE #237

@lcnr

Description

@lcnr
  • tests/ui/type/pattern_types/const_generics.rs
  • tests/ui/type/pattern_types/transmute.rs
//@ check-pass

#![feature(pattern_types, generic_pattern_types, pattern_type_macro)]
#![expect(incomplete_features)]

use std::pat::pattern_type;

trait Foo {}

impl<const START: u32, const END: u32> Foo for pattern_type!(u32 is START..=END) {}
thread 'rustc' panicked at /home/lcnr/rust/compiler/rustc_type_ir/src/relate/combine.rs:162:5:
assertion failed: !a.has_escaping_bound_vars()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions