rust/src/test/ui/derives
Matthias Krüger d8bf974df5
Rollup merge of #91544 - rukai:91492, r=wesleywiser
Fix duplicate derive clone suggestion

closes https://github.com/rust-lang/rust/issues/91492

The addition of:
```rust
derives.sort();
derives.dedup();
```
is what actually solves the problem.
The rest is just cleanup.

I want to improve the diagnostic message to provide the suggestion as a proper diff but ran into some problems, so I'll attempt that again in a follow up PR.
2021-12-23 00:28:51 +01:00
..
auxiliary
clone-debug-dead-code.rs Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
clone-debug-dead-code.stderr Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
derive-assoc-type-not-impl.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derive-assoc-type-not-impl.stderr Point at impl blocks when they introduce unmet obligations 2021-11-20 19:19:33 +00:00
derive-deadlock.rs expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
derive-deadlock.stderr expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
derive-Debug-use-ufcs-struct.rs Regression tests for issue 81211. 2021-02-01 17:08:37 -05:00
derive-Debug-use-ufcs-tuple.rs Regression tests for issue 81211. 2021-02-01 17:08:37 -05:00
derive-hygiene.rs
derive-macro-const-default.rs update tests 2021-12-10 19:21:25 +00:00
derive-marker-tricky.rs
derive-multiple-with-packed.rs expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
derive-on-trait-item-or-impl-item.rs Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
derive-on-trait-item-or-impl-item.stderr Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
derive-partial-ord.rs Fix derived PartialOrd operators 2021-02-09 08:15:37 +01:00
derive-renamed.rs Address review comments 2021-02-07 20:08:45 +03:00
derives-span-Clone-enum-struct-variant.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Clone-enum-struct-variant.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Clone-enum.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Clone-enum.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Clone-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Clone-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Clone-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Clone-tuple-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Debug-enum-struct-variant.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Debug-enum-struct-variant.stderr Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
derives-span-Debug-enum.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Debug-enum.stderr Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
derives-span-Debug-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Debug-struct.stderr Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
derives-span-Debug-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Debug-tuple-struct.stderr Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
derives-span-Default-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Default-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Default-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Default-tuple-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Eq-enum-struct-variant.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Eq-enum-struct-variant.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
derives-span-Eq-enum.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Eq-enum.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
derives-span-Eq-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Eq-struct.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
derives-span-Eq-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Eq-tuple-struct.stderr Use note to point at bound introducing requirement 2021-08-16 17:47:22 +00:00
derives-span-Hash-enum-struct-variant.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Hash-enum-struct-variant.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Hash-enum.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Hash-enum.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Hash-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Hash-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Hash-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Hash-tuple-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Ord-enum-struct-variant.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Ord-enum-struct-variant.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Ord-enum.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Ord-enum.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Ord-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Ord-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-Ord-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-Ord-tuple-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-PartialEq-enum-struct-variant.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-PartialEq-enum-struct-variant.stderr Consider unfulfilled obligations in binop errors 2021-10-05 23:34:13 +00:00
derives-span-PartialEq-enum.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-PartialEq-enum.stderr Consider unfulfilled obligations in binop errors 2021-10-05 23:34:13 +00:00
derives-span-PartialEq-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-PartialEq-struct.stderr Consider unfulfilled obligations in binop errors 2021-10-05 23:34:13 +00:00
derives-span-PartialEq-tuple-struct.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
derives-span-PartialEq-tuple-struct.stderr Consider unfulfilled obligations in binop errors 2021-10-05 23:34:13 +00:00
derives-span-PartialOrd-enum-struct-variant.rs ./x.py test --bless 2021-02-09 00:00:00 +00:00
derives-span-PartialOrd-enum-struct-variant.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-PartialOrd-enum.rs ./x.py test --bless 2021-02-09 00:00:00 +00:00
derives-span-PartialOrd-enum.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-PartialOrd-struct.rs ./x.py test --bless 2021-02-09 00:00:00 +00:00
derives-span-PartialOrd-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
derives-span-PartialOrd-tuple-struct.rs ./x.py test --bless 2021-02-09 00:00:00 +00:00
derives-span-PartialOrd-tuple-struct.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
deriving-bounds.rs
deriving-bounds.stderr
deriving-copyclone.rs
deriving-copyclone.stderr Fix handling of substitutions and binders when deciding whether to suggest references 2021-11-13 16:28:41 -05:00
deriving-meta-empty-trait-list.rs expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
deriving-meta-unknown-trait.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
deriving-meta-unknown-trait.stderr Remove trailing whitespace from error messages 2021-08-04 10:48:30 +02:00
deriving-no-inner-impl-error-message.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
deriving-no-inner-impl-error-message.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
deriving-non-type.rs Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
deriving-non-type.stderr Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
deriving-primitive.rs
deriving-primitive.stderr
deriving-with-repr-packed.rs make unaligned_refereces future-incompat lint warn-by-default, and remove the safe_packed_borrows lint that it replaces 2021-03-27 16:59:37 +01:00
deriving-with-repr-packed.stderr Show macro name in 'this error originates in macro' message 2021-05-12 19:03:06 -04:00
issue-36617.rs Update invalid crate attributes, add help message 2021-12-03 18:38:32 +00:00
issue-36617.stderr Update invalid crate attributes, add help message 2021-12-03 18:38:32 +00:00
issue-43023.rs Move some UI tests to more suitable subdirs 2021-08-10 13:34:05 +09:00
issue-43023.stderr Move some UI tests to more suitable subdirs 2021-08-10 13:34:05 +09:00
issue-91492.rs Fix duplicate derive clone suggestion 2021-12-05 16:50:17 +11:00
issue-91492.stderr Fix duplicate derive clone suggestion 2021-12-05 16:50:17 +11:00