about summary refs log tree commit diff
path: root/tests/ui/binding
AgeCommit message (Collapse)AuthorLines
2025-08-27Add test batch 2Oneirical-0/+92
2025-08-17Rehome tests/ui/issues/ tests [5/?]Oneirical-0/+28
2025-08-10Rehome tests/ui/issues/ tests [4/?]Oneirical-0/+26
2025-07-10cleaned up some testsKivooeo-5/+7
2025-07-01moved testsKivooeo-0/+13
2025-02-06Remove some unnecessary parens in `assert!` conditionsEsteban Küber-9/+6
While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
2024-12-04Tweak output of some const pattern errorsEsteban Küber-3/+6
- 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-26tests: remove `//@ pretty-expanded` usages许杰友 Jieyou Xu (Joe)-10/+0
Done with ```bash sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs ``` and ``` sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs ```
2024-09-13Update tests for hidden references to mutable staticObei Sideg-0/+2
2024-05-02Stabilize exclusive_rangeRoss Smyth-1/+0
2024-04-21Move some testsCaio-0/+52
2024-03-20Replace `mir_built` query with a hook and use mir_const everywhere insteadOli Scherer-32/+32
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-109/+109
2024-02-07Rollup merge of #120479 - estebank:issue-61788, r=wesleywiserGuillaume Boisseau-0/+114
Suggest turning `if let` into irrefutable `let` if appropriate When encountering an `if let` tail expression without an `else` arm for an enum with a single variant, suggest writing an irrefutable `let` binding instead. ``` error[E0317]: `if` may be missing an `else` clause --> $DIR/irrefutable-if-let-without-else.rs:8:5 | LL | fn foo(x: Enum) -> i32 { | --- expected `i32` because of this return type LL | / if let Enum::Variant(value) = x { LL | | value LL | | } | |_____^ expected `i32`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type help: consider using an irrefutable `let` binding instead | LL ~ let Enum::Variant(value) = x; LL ~ value | ``` Fix #61788.
2024-02-06Suggest turnging `if let` into irrefutable `let` if appropriateEsteban Küber-0/+114
When encountering an `if let` tail expression without an `else` arm for an enum with a single variant, suggest writing an irrefutable `let` binding instead. ``` error[E0317]: `if` may be missing an `else` clause --> $DIR/irrefutable-if-let-without-else.rs:8:5 | LL | fn foo(x: Enum) -> i32 { | --- expected `i32` because of this return type LL | / if let Enum::Variant(value) = x { LL | | value LL | | } | |_____^ expected `i32`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type help: consider using an irrefutable `let` binding instead | LL ~ let Enum::Variant(value) = x; LL ~ value | ``` Fix #61788.
2024-01-26remove illegal_floating_point_literal_pattern lintRalf Jung-1/+0
2024-01-05Stabilize THIR unsafeckMatthew Jasper-72/+72
2024-01-02Adjust compiler tests for unused_tuple_struct_fields -> dead_codeJake Goulding-3/+3
2023-11-24Show number in error message even for one errorNilstrieb-1/+1
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-28Remove asmjs from testsJubilee Young-1/+0
2023-10-24Add diverging match guard test.Camille GILLOT-2/+2
2023-10-24Use `PlaceMention` for match scrutinees.Camille GILLOT-88/+2
2023-09-19Add more if let guard testsMatthew Jasper-0/+4
2023-04-28improve error notes for packed struct reference diagnosticbindsdev-6/+12
2023-04-03remove invalid ignore-prettyPietro Albini-1/+0
2023-03-09Ignore AscribeUserType in unsafeck to avoid duplicate diagnostics.Camille GILLOT-20/+11
2023-03-09Introduce a no-op PlaceMention statement for `let _ =`.Camille GILLOT-12/+29
2023-03-09Add ui test.Camille GILLOT-7/+71
2023-01-31make unaligned_reference a hard errorRalf Jung-80/+16
2023-01-11Move /src/test to /testsAlbert Larsan-0/+2717