Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/parser/issues/issue-72373.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
266 B
Rust
Raw Normal View History

improve diagnostics suggestion for missing `@` in slice id binding to rest pattern add issue 72373 tests fmt test fix suggestion format Replacement, not insertion of suggested string implement review changes refactor to span_suggestion_verbose, improve suggestion message, change id @ pattern space formatting fmt fix diagnostics spacing between ident and @ refactor reference
2020-05-27 14:09:54 -04:00
fn foo(c: &[u32], n: u32) -> u32 {
match *c {
[h, ..] if h > n => 0,
[h, ..] if h == n => 1,
[h, ref ts..] => foo(c, n - h) + foo(ts, n),
parse guard patterns Co-authored-by: Max Niederman <max@maxniederman.com>
2024-11-24 17:36:52 +01:00
//~^ ERROR expected one of `,`, `@`, `]`, `if`, or `|`, found `..`
improve diagnostics suggestion for missing `@` in slice id binding to rest pattern add issue 72373 tests fmt test fix suggestion format Replacement, not insertion of suggested string implement review changes refactor to span_suggestion_verbose, improve suggestion message, change id @ pattern space formatting fmt fix diagnostics spacing between ident and @ refactor reference
2020-05-27 14:09:54 -04:00
[] => 0,
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2731ms 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