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/match/issue-26251.rs

16 lines
260 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-pass
Rename the `overlapping_patterns` lint to `overlapping_range_endpoints`
2020-10-22 18:34:00 +01:00
#![allow(overlapping_range_endpoints)]
Only emit overlapping patterns lint if the overlap is partial
2019-10-06 21:47:01 -07:00
Add tests for #20433, #26251, #28625, #33687 Closes #20433 Closes #26251 Closes #28625 Closes #33687
2016-08-27 18:37:27 -04:00
fn main() {
let x = 'a';
let y = match x {
migrate codebase to `..=` inclusive range patterns These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-05-28 19:42:11 -07:00
'a'..='b' if false => "one",
Add tests for #20433, #26251, #28625, #33687 Closes #20433 Closes #26251 Closes #28625 Closes #33687
2016-08-27 18:37:27 -04:00
'a' => "two",
migrate codebase to `..=` inclusive range patterns These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-05-28 19:42:11 -07:00
'a'..='b' => "three",
Add tests for #20433, #26251, #28625, #33687 Closes #20433 Closes #26251 Closes #28625 Closes #33687
2016-08-27 18:37:27 -04:00
_ => panic!("what?"),
};
assert_eq!(y, "two");
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4056ms 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