about summary refs log tree commit diff
path: root/tests/ui/empty
AgeCommit message (Collapse)AuthorLines
2024-11-23Update tests for new TRPL chapter orderChris Krycho-1/+1
2024-08-28Suggest the struct variant pattern syntax on usage of unit variant pattern ↵tunawasabi-0/+30
for a struct variant
2024-07-18More accurate suggestions when writing wrong style of enum variant literalEsteban Küber-9/+28
``` error[E0533]: expected value, found struct variant `E::Empty3` --> $DIR/empty-struct-braces-expr.rs:18:14 | LL | let e3 = E::Empty3; | ^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL | let e3 = E::Empty3 {}; | ++ ``` ``` error[E0533]: expected value, found struct variant `E::V` --> $DIR/struct-literal-variant-in-if.rs:10:13 | LL | if x == E::V { field } {} | ^^^^ not a value | help: you might have meant to create a new value of the struct | LL | if x == (E::V { field }) {} | + + ``` ``` error[E0618]: expected function, found enum variant `Enum::Unit` --> $DIR/suggestion-highlights.rs:15:5 | LL | Unit, | ---- enum variant `Enum::Unit` defined here ... LL | Enum::Unit(); | ^^^^^^^^^^-- | | | call expression requires function | help: `Enum::Unit` is a unit enum variant, and does not take parentheses to be constructed | LL - Enum::Unit(); LL + Enum::Unit; | ``` ``` error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/suggestion-highlights.rs:36:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple; | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL | Enum::Tuple(/* i32 */); | ~~~~~~~~~~~~~~~~; | ```
2024-06-25RFC 2383: Stabilize `lint_reasons` :tada:xFrednet-11/+9
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-11/+11
2023-11-24Show number in error message even for one errorNilstrieb-4/+4
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-06-10Make "consider importing" consistent for macrosMu001999-2/+4
2023-03-13resolve: Remove `struct_field_names_untracked`Vadim Petrochenkov-2/+2
2023-01-30Tweak use of trimmed pathsEsteban Küber-2/+2
2023-01-30Modify primary span label for E0308Esteban Küber-2/+2
The previous output was unintuitive to users.
2023-01-17note -> helpMichael Goulet-1/+1
2023-01-11Don't recommend `if let` if `let else` worksmejrs-5/+1
2023-01-11Migrate pattern matchingmejrs-6/+7
2023-01-11Move /src/test to /testsAlbert Larsan-0/+1023