bors
4886937212
Auto merge of #10853 - MarcusGrass:fix-from-over-into-self, r=Alexendoo
...
Ignore fix for `from_over_into` if the target type contains a `Self` reference
Fixes https://github.com/rust-lang/rust-clippy/issues/10838 .
This is my first time contributing here, and the fix is kind of ugly.
I've worked a bit with `quote` and was trying to figure out a way to replace the type in a better way than just a raw string-replace but couldn't quite figure out how to.
The only thing really required to fix this, is to replace all `Self` references with the type stated in the `from` variable, this isn't entirely simple to do with raw strings without creating a mess though.
We need to find and replace all `Self`'s in a variable with `from` but there could be an arbitrary amount, in a lot of different positions. As well as some type that contains the name self, like `SelfVarSelf` which shouldn't be replaced.
The strategy is essentially, if `"Self"` is surrounded on both sides by something that isn't alphanumeric, then we're golden, then trying to make that reasonably efficient.
I would not be offended if the solution is too messy to accept!
changelog: [from_over_into]: Replace Self with the indicated variable in suggestion and fix.
2023-06-04 17:53:54 +00:00
..
2023-06-03 15:57:36 +00:00
2023-05-22 11:52:26 +02:00
2023-05-24 10:53:31 -05:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-24 11:06:56 -05:00
2023-05-24 11:06:56 -05:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-24 10:53:31 -05:00
2023-06-02 09:01:51 +00:00
2023-06-02 09:01:51 +00:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-22 16:13:23 +02:00
2023-05-22 16:13:23 +02:00
2023-05-22 16:13:23 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-06-01 14:29:56 -05:00
2023-06-01 14:29:56 -05:00
2023-06-01 14:29:56 -05:00
2023-05-20 15:39:26 +02:00
2023-06-01 16:02:42 +02:00
2023-06-01 16:02:42 +02:00
2023-06-01 16:02:42 +02:00
2023-06-01 16:02:42 +02:00
2023-06-01 10:46:29 +02:00
2023-05-24 10:53:31 -05:00
2023-05-24 10:53:31 -05:00
2023-05-22 11:52:26 +02:00
2023-05-17 23:53:58 +02:00
2023-05-21 15:07:53 +02:00
2023-05-21 15:07:53 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-06-01 18:55:24 +02:00
2023-06-01 18:55:24 +02:00
2023-06-02 14:46:27 +02:00
2023-06-02 14:46:27 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-22 14:04:13 +02:00
2023-05-22 14:04:13 +02:00
2023-05-21 14:09:03 +02:00
2023-05-31 23:52:02 +02:00
2023-05-31 23:52:02 +02:00
2023-05-21 13:37:32 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-24 21:45:46 +00:00
2023-05-24 21:45:46 +00:00
2023-05-24 21:45:46 +00:00
2023-05-22 11:52:26 +02:00
2023-05-22 11:52:26 +02:00
2023-05-23 23:47:04 +00:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-31 00:17:26 +02:00
2023-05-31 00:17:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-06-02 13:26:12 -05:00
2023-06-02 13:26:12 -05:00
2023-06-02 13:14:16 -05:00
2023-05-22 11:52:26 +02:00
2023-05-22 11:52:26 +02:00
2023-05-26 15:38:38 +02:00
2023-05-26 15:38:38 +02:00
2023-05-26 15:38:38 +02:00
2023-05-26 15:38:38 +02:00
2023-05-26 15:38:38 +02:00
2023-05-26 15:38:38 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-28 12:53:03 +01:00
2023-05-28 12:53:03 +01:00
2023-06-02 10:17:55 +02:00
2023-06-02 10:17:55 +02:00
2023-06-02 10:17:55 +02:00
2023-05-22 23:00:28 -04:00
2023-05-22 23:00:28 -04:00
2023-05-22 20:02:45 -04:00
2023-05-22 23:00:28 -04:00
2023-05-22 23:00:28 -04:00
2023-05-22 20:02:45 -04:00
2023-05-22 11:52:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-20 15:39:26 +02:00
2023-05-24 10:53:31 -05:00
2023-05-24 10:53:31 -05:00
2023-05-25 04:17:36 -05:00
2023-05-25 04:17:36 -05:00
2023-05-25 04:17:36 -05:00
2023-05-21 23:07:30 +02:00
2023-05-23 17:22:23 +02:00
2023-05-30 22:32:26 +02:00
2023-05-30 22:32:26 +02:00
2023-06-03 19:38:55 +02:00
2023-05-20 15:39:26 +02:00
2023-05-30 21:29:04 +03:00
2023-05-30 21:29:04 +03:00
2023-05-30 21:29:04 +03:00