rust/tests/ui/derives
Matthias Krüger 13314df21b
Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix
Detect pub structs never constructed and unused associated constants

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->

Lints never constructed public structs.

If we don't provide public methods to construct public structs with private fields, and don't construct them in the local crate. They would be never constructed. So that we can detect such public structs.

---
Update:

Also lints unused associated constants in traits.
2024-06-07 20:14:28 +02:00
..
auxiliary Avoid expanding to unstable internal method 2024-04-02 22:21:16 +00:00
clone-debug-dead-code-in-the-same-struct.rs Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
clone-debug-dead-code-in-the-same-struct.stderr Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
clone-debug-dead-code.rs
clone-debug-dead-code.stderr
derive-assoc-type-not-impl.rs
derive-assoc-type-not-impl.stderr
derive-deadlock.rs
derive-deadlock.stderr
derive-Debug-use-ufcs-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-Debug-use-ufcs-tuple.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-hrtb-for-bare-fn-field-with-lifetime.rs When deriveing, account for HRTB on BareFn fields 2024-06-04 20:46:03 +00:00
derive-hygiene.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-macro-const-default.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-marker-tricky.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-multiple-with-packed.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-on-trait-item-or-impl-item.rs
derive-on-trait-item-or-impl-item.stderr
derive-partial-ord.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-renamed.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derives-span-Clone-enum-struct-variant.rs
derives-span-Clone-enum-struct-variant.stderr
derives-span-Clone-enum.rs
derives-span-Clone-enum.stderr
derives-span-Clone-struct.rs
derives-span-Clone-struct.stderr
derives-span-Clone-tuple-struct.rs
derives-span-Clone-tuple-struct.stderr
derives-span-Debug-enum-struct-variant.rs
derives-span-Debug-enum-struct-variant.stderr
derives-span-Debug-enum.rs
derives-span-Debug-enum.stderr
derives-span-Debug-struct.rs
derives-span-Debug-struct.stderr
derives-span-Debug-tuple-struct.rs
derives-span-Debug-tuple-struct.stderr
derives-span-Default-struct.rs
derives-span-Default-struct.stderr
derives-span-Default-tuple-struct.rs
derives-span-Default-tuple-struct.stderr
derives-span-Eq-enum-struct-variant.rs
derives-span-Eq-enum-struct-variant.stderr
derives-span-Eq-enum.rs
derives-span-Eq-enum.stderr
derives-span-Eq-struct.rs
derives-span-Eq-struct.stderr
derives-span-Eq-tuple-struct.rs
derives-span-Eq-tuple-struct.stderr
derives-span-Hash-enum-struct-variant.rs
derives-span-Hash-enum-struct-variant.stderr
derives-span-Hash-enum.rs
derives-span-Hash-enum.stderr
derives-span-Hash-struct.rs
derives-span-Hash-struct.stderr
derives-span-Hash-tuple-struct.rs
derives-span-Hash-tuple-struct.stderr
derives-span-Ord-enum-struct-variant.rs
derives-span-Ord-enum-struct-variant.stderr
derives-span-Ord-enum.rs
derives-span-Ord-enum.stderr
derives-span-Ord-struct.rs
derives-span-Ord-struct.stderr
derives-span-Ord-tuple-struct.rs
derives-span-Ord-tuple-struct.stderr
derives-span-PartialEq-enum-struct-variant.rs
derives-span-PartialEq-enum-struct-variant.stderr Do not add leading asterisk in the PartialEq 2024-04-23 20:56:52 +02:00
derives-span-PartialEq-enum.rs
derives-span-PartialEq-enum.stderr Do not add leading asterisk in the PartialEq 2024-04-23 20:56:52 +02:00
derives-span-PartialEq-struct.rs
derives-span-PartialEq-struct.stderr
derives-span-PartialEq-tuple-struct.rs
derives-span-PartialEq-tuple-struct.stderr
derives-span-PartialOrd-enum-struct-variant.rs
derives-span-PartialOrd-enum-struct-variant.stderr
derives-span-PartialOrd-enum.rs
derives-span-PartialOrd-enum.stderr
derives-span-PartialOrd-struct.rs
derives-span-PartialOrd-struct.stderr
derives-span-PartialOrd-tuple-struct.rs
derives-span-PartialOrd-tuple-struct.stderr
deriving-bounds.rs
deriving-bounds.stderr
deriving-copyclone.rs
deriving-copyclone.stderr
deriving-meta-empty-trait-list.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-meta-unknown-trait.rs
deriving-meta-unknown-trait.stderr
deriving-no-inner-impl-error-message.rs
deriving-no-inner-impl-error-message.stderr
deriving-non-type.rs
deriving-non-type.stderr
deriving-primitive.rs
deriving-primitive.stderr
deriving-with-repr-packed-2.rs
deriving-with-repr-packed-2.stderr Note for E0599 if shadowed bindings has the method. 2024-05-20 18:53:17 +08:00
deriving-with-repr-packed-move-errors.rs
deriving-with-repr-packed-move-errors.stderr Suggest .clone() in some move errors 2024-04-11 16:41:41 +00:00
deriving-with-repr-packed.rs
deriving-with-repr-packed.stderr Mention when type parameter could be Clone 2024-04-24 22:21:15 +00:00
issue-36617.rs
issue-36617.stderr
issue-43023.rs
issue-43023.stderr
issue-91492.rs
issue-91492.stderr
issue-91550.rs
issue-91550.stderr Use fulfillment, not evaluate, during method probe 2024-04-21 20:10:12 -04:00
issue-97343.rs
issue-97343.stderr
rustc-decodable-issue-123156.rs Avoid expanding to unstable internal method 2024-04-02 22:21:16 +00:00
rustc-decodable-issue-123156.stderr Avoid expanding to unstable internal method 2024-04-02 22:21:16 +00:00