You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some crates (often on only some feature combinations) advertise support for no_std use cases: situations where the Rust standard library components (std, alloc, etc.) are not available and one can only use core.
It's relatively easy to accidentally break no_std support: for example, change an import from core to its equivalent std re-export, like we test for here: #892 (comment)
Users with no_std use cases would be broken by such a change. We may be able to lint for this after #638 is resolved. We should consider adding a lint for it then!
Such a lint would have more false-negatives unless rustdoc JSON starts including non-pubuse statements when we --document-private-items. This is because a private item may import from std instead of core.
We'd also likely have to read source to make this work, not just rustdoc JSON. This is because rustdoc JSON normalizes import paths for foreign items, so std::fmt::Debug and core::fmt::Debug are both usually presented as core::fmt::Debug in rustdoc JSON.
The text was updated successfully, but these errors were encountered:
Some crates (often on only some feature combinations) advertise support for
no_std
use cases: situations where the Rust standard library components (std
,alloc
, etc.) are not available and one can only usecore
.It's relatively easy to accidentally break
no_std
support: for example, change an import fromcore
to its equivalentstd
re-export, like we test for here: #892 (comment)Users with
no_std
use cases would be broken by such a change. We may be able to lint for this after #638 is resolved. We should consider adding a lint for it then!Such a lint would have more false-negatives unless rustdoc JSON starts including non-
pub
use
statements when we--document-private-items
. This is because a private item may import fromstd
instead ofcore
.We'd also likely have to read source to make this work, not just rustdoc JSON. This is because rustdoc JSON normalizes import paths for foreign items, so
std::fmt::Debug
andcore::fmt::Debug
are both usually presented ascore::fmt::Debug
in rustdoc JSON.The text was updated successfully, but these errors were encountered: