rustfix doesn't fix "use of deprecated item" warnings
samuela opened this issue · 2 comments
I have a bunch of "use of deprecated item warnings" that look like
warning: use of deprecated item 'libc::fixed_width_ints::uint32_t': Use u32 instead.
--> util_linux/volume_id/xfs.rs:78:16
|
78 | pub dummy3: [uint32_t; 2],
| ^^^^^^^^
These would seem to be very straightforward to auto-fix since the alternative is presented in the warning itself.
Hey, thanks for the report! Sadly, this repo is just for the library that applies machine-readable suggestions. Making suggestions like this applicable is an issue for the main rust-lang/rust repo, as it is generated by the compiler. (Once it's fixed there, the rustfix tool can automatically apply it.)
I do however fear that it's not as easy as it seems: Library authors can pretty much add a random string there:
So there's no way for us to apply this suggestion without having a program interpret English text!
Can you maybe check if there is an issue alread on the rust-lang/rust repo for this? Otherwise you are very welcome to suggest how to extend this attribute to make it applicable!
Thanks again :)
@killercup Mm, I see. It would be great if there was more structured information in the deprecation notice. But of course that's an issue for rust-lang/rust...