about summary refs log tree commit diff
path: root/tests/ui/empty
AgeCommit message (Collapse)AuthorLines
2025-09-27improve empty attribute diagnosticJana Dönszelmann-0/+4
2025-07-06Rewrite empty attribute lintJonathan Brouwer-20/+16
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-05-24Avoid extra path trimming in method not found errorNoratrieb-2/+2
Method errors have an extra check that force trim paths whenever the normal string is longer than 10 characters, which can be quite unhelpful when multiple items have the same name (for example an `Error`). A user reported this force trimming as being quite unhelpful when they had a method error where the precise path of the `Error` mattered. The code uses `tcx.short_string` already to get the normal path, which tries to be clever around trimming paths if necessary, so there is no reason for this extra force trimming.
2025-04-30compiletest: Make diagnostic kind mandatory on line annotationsVadim Petrochenkov-3/+5
2025-02-14Trim suggestion parts to the subset that is purely additiveMichael Goulet-4/+4
2025-02-14Consider add-prefix replacements tooMichael Goulet-3/+2
2025-02-14Use underline suggestions for purely 'additive' replacementsMichael Goulet-9/+6
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-76/+114
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
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