-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs for Macro core::write
are not applicable to no_std
#45797
Comments
The only way is to write a note about the different context. |
@steveklabnik I can take this one and work on this. |
Great! Let me know if you need anything :) |
@jdhorwitz did you ever do this? No worries if not, but If so, I'd like to close it, and if not, we should get someone else to do it, unless you're still willing :) |
If no one's looking at this currenty, I can contribute to this 😁 . Just need a few pointers on what needs to be accomplished. |
@MagnumOpus21 that'd be great! The docs live here: Lines 309 to 351 in 3b77203
The docs need to have a note added to mention that this can be used without the standard library, and an example showing that usage. That's the high level overview, if you need more help than that, I'm happy to elaborate further! |
Awesome will get started @steveklabnik . |
@steveklabnik When I run |
…veklabnik Updated core/macros.rs to note it works in a no_std environment. Fixes rust-lang#45797 This PR updates the documentation of `write!` to note it works in a `no_std` environment, and adds an example to showcase this. In a `no_std` environment, the author of the code is responsible for the implementation of the `Write` trait. This example will work out of the box with `no_std`, but the implementation of `Write` is expected to be provided by the user. r? @steveklabnik
Stable: https://doc.rust-lang.org/core/macro.write.html
Nightly: https://doc.rust-lang.org/nightly/core/macro.write.html
Looks like the docs are shared between
core
andstd
, because of the implementation details. But, the problem is that the examples provided for thecore
macro won't be working inno_std
setup.I think it's better to either add a note about this or have accurate docs that would actually work. I can't think of a quick fix, though. Any ideas?
The text was updated successfully, but these errors were encountered: