rust/tests/ui/structs
Takayuki Maeda 9e84f6d86a
Rollup merge of #117110 - estebank:deref-field-suggestion, r=b-naber
Suggest field typo through derefs

Take into account implicit dereferences when suggesting fields.

```
error[E0609]: no field `longname` on type `Arc<S>`
  --> $DIR/suggest-field-through-deref.rs:10:15
   |
LL |     let _ = x.longname;
   |               ^^^^^^^^ help: a field with a similar name exists: `long_name`
```

CC https://github.com/rust-lang/rust/issues/78374#issuecomment-719564114
2023-11-19 04:14:41 +09:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
incomplete-fn-in-struct-definition.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
incomplete-fn-in-struct-definition.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80853.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80853.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
large-records.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-chain-expression-failure.rs Recurse over the method chain and maintain a stack to peek at previous receiver to align spans 2023-11-10 13:00:27 -08:00
method-chain-expression-failure.stderr Recurse over the method chain and maintain a stack to peek at previous receiver to align spans 2023-11-10 13:00:27 -08:00
multi-line-fru-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multi-line-fru-suggestion.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rhs-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-base-wrong-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-base-wrong-type.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
struct-duplicate-comma.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-duplicate-comma.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-duplicate-comma.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-field-cfg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-field-cfg.stderr Don't mention already set fields 2023-06-05 21:00:08 +00:00
struct-field-init-syntax.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-field-init-syntax.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-field-privacy.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-field-privacy.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-decl-dupe.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-decl-dupe.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-dupe.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-dupe.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-hints-no-dupe.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-hints-no-dupe.stderr tweak logic of "unknown field" label 2023-11-18 00:40:11 +00:00
struct-fields-hints.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-hints.stderr tweak logic of "unknown field" label 2023-11-18 00:40:11 +00:00
struct-fields-missing.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-missing.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-shorthand-unresolved.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-shorthand-unresolved.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-shorthand.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-shorthand.stderr Don't mention already set fields 2023-06-05 21:00:08 +00:00
struct-fields-too-many.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-too-many.stderr Don't mention already set fields 2023-06-05 21:00:08 +00:00
struct-fields-typo.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fields-typo.stderr recover primary span label 2023-11-16 17:00:23 +00:00
struct-fn-in-definition.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-fn-in-definition.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-missing-comma.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-missing-comma.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-missing-comma.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-pat-derived-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-pat-derived-error.stderr recover primary span label 2023-11-16 17:00:23 +00:00
struct-path-alias-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-path-alias-bounds.stderr Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
struct-path-associated-type.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
struct-path-associated-type.stderr Unify suggestion wording 2023-10-17 17:33:55 +00:00
struct-path-self-type-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-path-self-type-mismatch.stderr Suggest replacing Self with the right type on type error 2023-11-16 16:19:19 +00:00
struct-path-self.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-path-self.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-record-suggestion.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-record-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-record-suggestion.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
struct-tuple-field-names.rs better diagnostics for pattern matching tuple structs 2023-03-30 10:38:04 +02:00
struct-tuple-field-names.stderr better diagnostics for pattern matching tuple structs 2023-03-30 10:38:04 +02:00
struct-variant-privacy-xc.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-variant-privacy-xc.stderr Tweak privacy errors to account for reachable items 2023-06-22 16:50:31 +00:00
struct-variant-privacy.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
struct-variant-privacy.stderr Tweak privacy errors to account for reachable items 2023-06-22 16:50:31 +00:00
structure-constructor-type-mismatch.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
structure-constructor-type-mismatch.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
suggest-private-fields.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-private-fields.stderr tweak logic of "unknown field" label 2023-11-18 00:40:11 +00:00
suggest-replacing-field-when-specifying-same-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-replacing-field-when-specifying-same-type.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unresolved-struct-with-fru.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unresolved-struct-with-fru.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00