bors
1807580a49
Auto merge of #12772 - phi-gamma:redundant-struct-recreation, r=y21
...
add lint for recreation of an entire struct
This lint makes Clippy warn about situations where an owned struct is
essentially recreated by moving all its fields into a new instance of
the struct. The lint is not machine-applicable because the source
struct may have been partially moved.
This lint originated in something I spotted during peer review. While
working on their branch a colleague ended up with a commit where a
function returned a struct that 1:1 replicated one of its owned inputs
from its members. Initially I suspected they hadn’t run their code
through Clippy but AFAICS there is no lint for this situation yet.
changelog: new lint: [`redundant_owned_struct_recreation`]
### New lint checklist
- \[+] Followed [lint naming conventions][lint_naming]
- \[+] Added passing UI tests (including committed `.stderr` file)
- \[+] `cargo test` passes locally
- \[+] Executed `cargo dev update_lints`
- \[+] Added lint documentation
- \[+] Run `cargo dev fmt`
2024-07-21 23:02:38 +00:00
..
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-18 14:50:45 +02:00
2024-07-20 12:50:36 +07:00
2024-07-17 14:05:49 -04:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-27 18:56:04 +02:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-06-08 18:44:40 +07:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-13 12:30:48 +02:00
2024-06-24 11:28:21 -04:00
2024-07-04 21:52:46 -04:00
2024-06-13 12:30:48 +02:00
2024-05-02 17:26:44 +02:00
2024-07-04 14:31:15 +02:00
2024-07-05 10:28:26 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-04-04 19:44:04 +02:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-21 14:22:48 +08:00
2024-04-04 19:52:55 +02:00
2024-04-04 19:52:55 +02:00
2024-07-01 22:06:06 +00:00
2024-05-30 10:49:05 +02:00
2024-07-06 00:24:48 -04:00
2024-06-13 12:30:48 +02:00
2024-07-03 18:24:23 +00:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-04-04 19:52:55 +02:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-07-02 11:25:31 +08:00
2024-06-23 13:11:54 +01:00
2024-04-04 19:52:55 +02:00
2024-03-21 11:42:49 -04:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-08 16:04:47 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-05-21 10:39:30 -07:00
2024-07-17 14:05:49 -04:00
2024-06-27 18:56:04 +02:00
2024-06-19 13:30:21 -04:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-05-21 10:39:30 -07:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-04-16 16:29:13 +10:00
2024-05-21 10:39:30 -07:00
2024-07-08 16:04:47 -04:00
2024-02-28 08:55:35 +11:00
2024-07-17 14:05:49 -04:00
2024-03-22 20:48:36 +01:00
2024-06-27 18:56:04 +02:00
2024-06-27 18:56:04 +02:00
2024-04-16 16:29:13 +10:00
2024-06-27 12:03:57 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-07-07 16:35:05 -04:00
2024-07-07 20:15:19 -04:00
2024-07-07 16:37:31 -04:00
2024-07-17 14:05:49 -04:00
2024-06-13 12:30:48 +02:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-07-07 16:41:36 -04:00
2024-07-07 16:43:07 -04:00
2024-05-30 10:49:05 +02:00
2024-07-07 16:51:20 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-07 18:05:41 -04:00
2024-07-07 18:05:51 -04:00
2024-07-07 18:06:00 -04:00
2024-07-07 18:06:17 -04:00
2024-06-13 12:30:48 +02:00
2024-07-21 14:22:48 +08:00
2024-04-18 17:48:52 +02:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-03-10 23:33:00 +08:00
2024-04-04 19:52:55 +02:00
2024-05-08 16:57:31 +10:00
2024-05-30 22:52:33 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-07 18:07:16 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-07 18:07:36 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-07 18:08:11 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-29 22:31:10 +02:00
2024-07-07 18:11:05 -04:00
2024-07-17 14:05:49 -04:00
2024-07-07 18:11:55 -04:00
2024-07-07 18:12:05 -04:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-07 18:12:39 -04:00
2024-07-06 00:24:48 -04:00
2024-05-09 20:58:46 -04:00
2024-07-05 02:42:58 -04:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-13 12:30:48 +02:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-06-27 18:56:04 +02:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-03-21 22:20:40 +01:00
2024-04-15 18:48:12 -04:00
2024-04-04 19:52:55 +02:00
2024-05-30 10:49:05 +02:00
2024-04-17 09:34:39 -04:00
2024-06-13 12:30:48 +02:00
2024-04-17 09:34:39 -04:00
2024-07-17 14:05:49 -04:00
2024-05-21 10:39:30 -07:00
2024-06-27 18:56:04 +02:00
2024-06-27 18:56:04 +02:00
2024-06-27 18:56:04 +02:00
2024-06-13 12:30:48 +02:00
2024-06-27 12:03:57 -04:00
2024-07-17 14:05:49 -04:00
2024-05-21 10:39:30 -07:00
2024-04-04 19:52:55 +02:00
2024-05-17 18:33:37 -03:00
2024-07-06 00:24:48 -04:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-27 18:56:04 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-27 18:56:04 +02:00
2024-05-29 10:04:08 +00:00
2024-04-17 09:34:39 -04:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-07-07 10:24:46 -04:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-21 14:22:48 +08:00
2024-05-30 10:49:05 +02:00
2024-04-04 19:52:55 +02:00
2024-05-29 10:04:08 +00:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-03-22 20:36:21 +01:00
2024-06-13 12:30:48 +02:00
2024-05-08 16:57:31 +10:00
2024-03-06 00:35:19 -05:00
2024-07-17 14:05:49 -04:00
2024-04-17 09:34:39 -04:00
2024-04-04 19:52:55 +02:00
2024-06-24 11:28:21 -04:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-05-30 10:49:05 +02:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-07-07 10:24:42 -04:00
2024-05-02 17:26:44 +02:00
2024-04-17 09:34:39 -04:00
2024-07-20 12:50:36 +07:00
2024-06-23 13:11:54 +01:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-05-08 16:57:31 +10:00
2024-07-17 14:05:49 -04:00
2024-07-03 19:54:02 +01:00
2024-05-30 10:49:05 +02:00
2024-06-13 12:30:48 +02:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-04-14 18:45:28 +02:00
2024-07-17 14:05:49 -04:00
2024-03-22 11:13:29 -04:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-06-13 12:30:48 +02:00
2024-02-27 15:50:17 +01:00
2024-06-27 15:19:08 -04:00
2024-06-13 12:30:48 +02:00
2024-05-30 10:49:05 +02:00
2024-04-04 19:52:55 +02:00
2024-05-30 10:49:05 +02:00
2024-05-02 17:26:44 +02:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-07-08 16:04:47 -04:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-03-22 06:31:40 +01:00
2024-03-14 12:42:04 +01:00
2024-06-03 20:36:27 -04:00
2024-07-17 14:05:49 -04:00
2024-04-04 19:52:55 +02:00
2024-05-30 10:49:05 +02:00
2024-07-09 13:53:11 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-04-14 18:45:28 +02:00
2024-04-04 19:52:55 +02:00
2024-03-22 20:48:36 +01:00
2024-04-04 19:52:55 +02:00
2024-07-17 14:05:49 -04:00
2024-02-27 15:50:17 +01:00
2024-06-13 12:30:48 +02:00
2024-05-21 10:39:30 -07:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-04-17 09:34:39 -04:00
2024-05-02 17:26:44 +02:00
2024-07-17 14:05:49 -04:00
2024-05-30 10:49:05 +02:00
2024-07-17 14:05:49 -04:00
2024-07-17 14:05:49 -04:00
2024-06-19 13:30:21 -04:00
2024-07-18 12:22:08 +07:00
2024-04-16 16:29:13 +10:00