summary refs log tree commit diff
path: root/tests/ui/half-open-range-patterns
AgeCommit message (Collapse)AuthorLines
2024-11-23Update tests for new TRPL chapter orderChris Krycho-7/+7
2024-10-06On function and method calls in patterns, link to the bookEsteban Küber-2/+4
``` error: expected a pattern, found an expression --> f889.rs:3:13 | 3 | let (x, y.drop()) = (1, 2); //~ ERROR | ^^^^^^^^ not a pattern | = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html> error[E0532]: expected a pattern, found a function call --> f889.rs:2:13 | 2 | let (x, drop(y)) = (1, 2); //~ ERROR | ^^^^ not a tuple struct or tuple variant | = note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html> ``` Fix #97200.
2024-09-18Add suggestions for expressions in patternsLieselotte-6/+28
2024-07-12Make parse error suggestions verbose and fix spansEsteban Küber-19/+113
Go over all structured parser suggestions and make them verbose style. When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
2024-07-08Update f16/f128 FIXMEs that needed (NEG_)INFINITYTrevor Gross-39/+51
2024-06-23Replace `f16` and `f128` pattern matching stubs with real implementationsTrevor Gross-3/+82
This section of code depends on `rustc_apfloat` rather than our internal types, so this is one potential ICE that we should be able to melt now. This also fixes some missing range and match handling in `rustc_middle`.
2024-05-02Stabilize exclusive_rangeRoss Smyth-329/+103
2024-04-12Suppress erroneous suggestionAlan Egerton-12/+0
The suggestion to use `let else` with an uninitialized refutable `let` statement was erroneous: `let else` cannot be used with deferred initialization.
2024-03-13Remove `MaybeInfiniteInt::JustAfterMax`Nadrieril-8/+8
It was inherited from before half-open ranges, but it doesn't pull its weight anymore. We lose a tiny bit of diagnostic precision.
2024-03-09Allow lint where we don't careNadrieril-68/+70
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-6/+6
2024-02-08Continue to borrowck even if there were previous errorsOli Scherer-10/+118
2024-02-05Rollup merge of #116284 - RalfJung:no-nan-match, r=cjgillotMatthias Krüger-84/+81
make matching on NaN a hard error, and remove the rest of illegal_floating_point_literal_pattern These arms would never be hit anyway, so the pattern makes little sense. We have had a future-compat lint against float matches in general for a *long* time, so I hope we can get away with immediately making this a hard error. This is part of implementing https://github.com/rust-lang/rfcs/pull/3535. Closes https://github.com/rust-lang/rust/issues/41620 by removing the lint. https://github.com/rust-lang/reference/pull/1456 updates the reference to match.
2024-02-01`#![feature(inline_const_pat)]` is no longer incompleteMatthew Jasper-1/+0
2024-01-28Handle methodcalls & operators in patternsLieselotte-10/+154
2024-01-26remove illegal_floating_point_literal_pattern lintRalf Jung-84/+81
2024-01-19add help message for `exclusive_range_pattern` errorRowan S-L-0/+8
2024-01-13Bless testsGeorge-lewis-0/+11
Update tests
2024-01-03Recover parentheses in range patternsLieselotte-15/+5
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2023-12-28Don't expect bodyless arms if the pattern can never be a never patternLieselotte-6/+6
2023-12-03Parse a pattern with no armNadrieril-6/+6
2023-11-24Show number in error message even for one errorNilstrieb-5/+5
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-04-03Perform match checking on THIR.Camille GILLOT-103/+12
2023-02-02Improve diagnostic for missing space in range patternclubby789-12/+9
2023-01-30Modify primary span label for E0308Esteban Küber-6/+6
The previous output was unintuitive to users.
2023-01-28Check for missing space between fat arrow and range patternclubby789-0/+27
2023-01-11Move /src/test to /testsAlbert Larsan-0/+2130