rust/tests/ui/parser/recover
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
..
binding-name-starting-with-number.rs Fix test and move to more appropriate directory 2023-11-29 18:47:32 +00:00
binding-name-starting-with-number.stderr Fix test and move to more appropriate directory 2023-11-29 18:47:32 +00:00
recover-assoc-const-constraint.rs
recover-assoc-const-constraint.stderr Bless tests 2024-01-13 12:46:58 -05:00
recover-assoc-eq-missing-term.rs
recover-assoc-eq-missing-term.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
recover-assoc-lifetime-constraint.rs Suggest assoc ty bound on lifetime in eq constraint 2024-03-23 00:17:30 +01:00
recover-assoc-lifetime-constraint.stderr Suggest assoc ty bound on lifetime in eq constraint 2024-03-23 00:17:30 +01:00
recover-colon-instead-of-eq-in-local.rs Cancel parsing ever made during recovery 2024-03-06 21:59:03 +00:00
recover-colon-instead-of-eq-in-local.stderr Cancel parsing ever made during recovery 2024-03-06 21:59:03 +00:00
recover-const-async-fn-ptr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-const-async-fn-ptr.stderr
recover-enum.rs
recover-enum.stderr
recover-enum2.rs Change how for (x in foo) {} is handled 2023-11-29 18:47:32 +00:00
recover-enum2.stderr Always emit help when failing to parse enum variant 2023-11-29 18:47:32 +00:00
recover-field-extra-angle-brackets-in-struct-with-a-field.rs
recover-field-extra-angle-brackets-in-struct-with-a-field.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
recover-field-extra-angle-brackets.rs
recover-field-extra-angle-brackets.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
recover-field-semi.rs
recover-field-semi.stderr
recover-fn-ptr-with-generics.rs Simple modification of diagnostic information 2023-12-21 10:17:11 +08:00
recover-fn-ptr-with-generics.stderr Simple modification of diagnostic information 2023-12-21 10:17:11 +08:00
recover-fn-trait-from-fn-kw.rs
recover-fn-trait-from-fn-kw.stderr Fix msg for verbose suggestions with confusable capitalization 2024-02-14 20:15:13 +00:00
recover-for-loop-parens-around-head.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-for-loop-parens-around-head.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-for-loop-parens-around-head.stderr Change how for (x in foo) {} is handled 2023-11-29 18:47:32 +00:00
recover-from-bad-variant.rs
recover-from-bad-variant.stderr
recover-from-homoglyph.rs
recover-from-homoglyph.stderr
recover-labeled-non-block-expr.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-labeled-non-block-expr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-labeled-non-block-expr.stderr
recover-missing-semi-before-item.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-missing-semi-before-item.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-missing-semi-before-item.stderr
recover-missing-semi.rs
recover-missing-semi.stderr
recover-parens-around-match-arm-head.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-parens-around-match-arm-head.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-parens-around-match-arm-head.stderr Fix tidy 2023-11-29 18:47:32 +00:00
recover-quantified-closure.rs
recover-quantified-closure.stderr Bless tests 2024-01-13 12:46:58 -05:00
recover-range-pats.rs Stabilize exclusive_range 2024-05-02 19:42:31 -04:00
recover-range-pats.stderr Simplify IntVarValue/FloatVarValue 2024-06-01 10:31:32 -04:00
recover-ref-dyn-mut.rs
recover-ref-dyn-mut.stderr
recover-struct.rs
recover-struct.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
recover-tuple-pat.rs
recover-tuple-pat.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
recover-tuple.rs
recover-tuple.stderr
recover-unticked-labels.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-unticked-labels.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recover-unticked-labels.stderr
recover-where-clause-before-tuple-struct-body-0.fixed Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
recover-where-clause-before-tuple-struct-body-0.rs Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
recover-where-clause-before-tuple-struct-body-0.stderr Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
recover-where-clause-before-tuple-struct-body-1.rs
recover-where-clause-before-tuple-struct-body-1.stderr
turbofish-arg-with-stray-colon.rs Make sure we consume a generic arg when checking mistyped turbofish 2024-05-09 10:47:14 -04:00
turbofish-arg-with-stray-colon.stderr Make sure we consume a generic arg when checking mistyped turbofish 2024-05-09 10:47:14 -04:00