mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-10 08:57:36 +00:00
25 lines
496 B
Rust
25 lines
496 B
Rust
//@ check-pass
|
|
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/200>.
|
|
// Make sure we structurally normalize in range pattern checking in HIR typeck.
|
|
|
|
trait Foo {
|
|
type Bar;
|
|
}
|
|
|
|
impl Foo for () {
|
|
type Bar = i32;
|
|
}
|
|
|
|
fn main() {
|
|
const X: <() as Foo>::Bar = 0;
|
|
|
|
match 0 {
|
|
X..=X => {}
|
|
_ => {}
|
|
}
|
|
}
|