Files
rust/tests/ui
Ethiraric 97dc4b22c6 [box_default]: Preserve required path segments
When encountering code such as:
```
Box::new(outer::Inner::default())
```
clippy would suggest replacing with `Box::<Inner>::default()`, dropping
the `outer::` segment. This behavior is incorrect and that commit fixes
it.

What it does is it checks the contents of the `Box::new` and, if it is
of the form `A::B::default`, does a text replacement, inserting `A::B`
in the `Box`'s quickfix generic list.
If the source does not match that pattern (including `Vec::from(..)`
or other `T::new()` calls), we then fallback to the original code.

Fixes #11927
2024-02-26 17:39:00 +01:00
..
2023-09-23 13:47:30 +00:00
2024-02-24 15:02:10 +01:00
2024-02-24 15:02:10 +01:00
2024-02-24 15:02:10 +01:00
2023-10-20 21:14:01 +00:00
2023-10-20 21:14:01 +00:00
2024-02-15 06:22:15 +09:00
2024-02-23 17:38:39 +01:00
2024-02-21 23:26:29 +09:00
2024-02-21 23:26:29 +09:00
2024-02-23 17:38:39 +01:00
2024-02-23 17:38:39 +01:00
2024-02-23 17:38:39 +01:00
2024-02-23 17:38:39 +01:00
2023-10-04 21:09:54 +00:00
2023-10-13 21:01:36 +00:00