rust/tests/ui/structs
Esteban Küber 7dffd24da5 Tweak privacy errors to account for reachable items
Suggest publicly accessible paths for items in private mod:

  When encountering a path in non-import situations that are not reachable
  due to privacy constraints, search for any public re-exports that the
  user could use instead.

Track whether an import suggestion is offering a re-export.

When encountering a path with private segments, mention if the item at
the final path segment is not publicly accessible at all.

Add item visibility metadata to privacy errors from imports:

  On unreachable imports, record the item that was being imported in order
  to suggest publicly available re-exports or to be explicit that the item
  is not available publicly from any path.

  In order to allow this, we add a mode to `resolve_path` that will not
  add new privacy errors, nor return early if it encounters one. This way
  we can get the `Res` corresponding to the final item in the import,
  which is used in the privacy error machinery.
2023-06-22 16:50:31 +00:00
..
auxiliary
incomplete-fn-in-struct-definition.rs
incomplete-fn-in-struct-definition.stderr
issue-80853.rs
issue-80853.stderr
large-records.rs
multi-line-fru-suggestion.rs
multi-line-fru-suggestion.stderr
rhs-type.rs
struct-base-wrong-type.rs
struct-base-wrong-type.stderr
struct-duplicate-comma.fixed
struct-duplicate-comma.rs
struct-duplicate-comma.stderr
struct-field-cfg.rs
struct-field-cfg.stderr Don't mention already set fields 2023-06-05 21:00:08 +00:00
struct-field-init-syntax.rs
struct-field-init-syntax.stderr
struct-field-privacy.rs
struct-field-privacy.stderr
struct-fields-decl-dupe.rs
struct-fields-decl-dupe.stderr
struct-fields-dupe.rs
struct-fields-dupe.stderr
struct-fields-hints-no-dupe.rs
struct-fields-hints-no-dupe.stderr
struct-fields-hints.rs
struct-fields-hints.stderr
struct-fields-missing.rs
struct-fields-missing.stderr
struct-fields-shorthand-unresolved.rs
struct-fields-shorthand-unresolved.stderr
struct-fields-shorthand.rs
struct-fields-shorthand.stderr Don't mention already set fields 2023-06-05 21:00:08 +00:00
struct-fields-too-many.rs
struct-fields-too-many.stderr Don't mention already set fields 2023-06-05 21:00:08 +00:00
struct-fields-typo.rs
struct-fields-typo.stderr
struct-fn-in-definition.rs
struct-fn-in-definition.stderr
struct-missing-comma.fixed
struct-missing-comma.rs
struct-missing-comma.stderr
struct-pat-derived-error.rs
struct-pat-derived-error.stderr
struct-path-alias-bounds.rs
struct-path-alias-bounds.stderr Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
struct-path-associated-type.rs
struct-path-associated-type.stderr
struct-path-self-type-mismatch.rs
struct-path-self-type-mismatch.stderr
struct-path-self.rs
struct-path-self.stderr
struct-record-suggestion.fixed
struct-record-suggestion.rs
struct-record-suggestion.stderr
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
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
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
structure-constructor-type-mismatch.stderr
suggest-private-fields.rs
suggest-private-fields.stderr
suggest-replacing-field-when-specifying-same-type.rs
suggest-replacing-field-when-specifying-same-type.stderr
unresolved-struct-with-fru.rs
unresolved-struct-with-fru.stderr