Samuel Tardieu
0aa0d074cd
Remove brackets around type name when it is no longer a prefix
...
When `<T>::default()` is replaced by `T` when `T` is a singleton,
the brackets around the type name can be removed.
2025-04-10 07:46:45 +02:00
Samuel Tardieu
253ecb9d7d
Signal the problem on the whole expression span
...
This is more consistent with what other lints are doing: the use of
`default` to create a unit struct is the whole expression.
2025-03-06 23:13:08 +01:00
Samuel Tardieu
429c09ead2
Do not suggest replacing an expression by an ambiguous type name
...
An expression such as `<_>::default()` should not be replaced by an
ambiguous type name such as `_` even if the inferred type in the
original expression is a singleton.
2025-03-06 22:42:48 +01:00
Guillaume Gomez
f666fd6417
Update UI tests
2025-02-15 13:38:16 +01:00
Oli Scherer
3d88fae050
Update ui test crate
2023-08-11 14:02:28 +00:00
y21
8c82486ea9
[default_constructed_unit_structs]: do not lint type aliases
2023-05-22 16:13:23 +02:00
Alex Macleod
68eb864c91
Ignore expressions from macros in default_constructed_unit_structs
2023-05-05 18:35:54 +00:00
Icxolu
160371550f
add rustfix annotation
2023-05-03 21:05:50 +02:00