Closed Stebalien closed 7 years ago
These are also in core
. We should probably figure out whether no_std
is set and suggest core::ptr::*
in that case.
We should probably figure out whether
no_std
is set and suggestcore::ptr::*
in that case.
This could be done for a lot a paths in suggestions.
Sounds like we could use a utility function that walks the parent chain to look for #[no_std]
.
You don't even need to walk the parent chain, the current crate is available as LateContext::krate
which has attributes.
True. I had forgotten that this attribute is crate-level only.
I'm happy to give this a shot.
Great! Feel free to ask if you have any question.
Add a lint to suggest converting all instances of:
To:
See https://github.com/rust-lang/rust/pull/34456