Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/ui/binding/const-param.rs

11 lines
250 B
Rust
Raw Permalink Normal View History

resolve: Prevent fresh bindings from shadowing ambiguity items Correctly treat const generic parameters in fresh binding disambiguation
2020-03-14 19:44:11 +03:00
// Identifier pattern referring to a const generic parameter is an error (issue #68853).
fn check<const N: usize>() {
match 1 {
Tweak output of some const pattern errors - Add primary span labels. - Point at const generic parameter used as pattern. - Point at statics used as pattern. - Point at let bindings used in const pattern.
2024-11-20 03:57:30 +00:00
N => {} //~ ERROR constant parameters cannot be referenced in patterns
resolve: Prevent fresh bindings from shadowing ambiguity items Correctly treat const generic parameters in fresh binding disambiguation
2020-03-14 19:44:11 +03:00
_ => {}
}
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1209ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API