rust/tests/ui/pattern/const-error-ice-issue-148542.rs
2025-11-06 09:41:16 +08:00

13 lines
292 B
Rust

//@ edition: 2021
// Regression test for #148542
// Ensure we don't ICE with "Invalid `ConstKind` for `const_to_pat`: {const error}"
fn foo() where &str:, {
//~^ ERROR `&` without an explicit lifetime name cannot be used here
match 42_u8 {
-10.. => {}
}
}
fn main() {}