Add std::ffi::c_str module by clarfonthey · Pull Request #112136 · rust-lang/rust (original) (raw)
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
r? @cuviper
(rustbot has picked a reviewer for you, use r? to override)
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the library team, which will review and decide on the PR/issue.
labels
This comment has been minimized.
mod c_str; |
#[doc(no_inline)] |
#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")] |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stability attribute got lost in some refactoring, I think. I decided to restore it when I was fixing up the code.
@@ -154,10 +154,39 @@ |
---|
#![stable(feature = "rust1", since = "1.0.0")] |
#[stable(feature = "alloc_c_string", since = "1.64.0")] |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stability attributes for these also got lost in refactoring. It makes things much more verbose, but I decided to keep it so the attributes were preserved.
@@ -276,6 +276,7 @@ |
---|
// |
// Library features (core): |
// tidy-alphabetical-start |
#![feature(c_str_module)] |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically I could make it work without these but I prefer the clarity of importing from the modules instead of the re-exports.
This comment has been minimized.
This comment has been minimized.
clarfonthey changed the title
Add std::ffi::c_str{,ing} modules Add std::ffi::c_str module
This comment has been minimized.
This comment has been minimized.
So, I actually don't know how to fix the links for the re-exports. It seems that rustdoc can't link to libstd when documenting core, but this feels like it should be possible. Would love if anyone could advise for some help here.
Right now, it appears that all these links are written manually, which will only work on the definition or the re-export, and not both, since they lie at different paths.
This comment has been minimized.
This comment has been minimized.
So, I actually don't know how to fix the links for the re-exports. It seems that rustdoc can't link to libstd when documenting core, but this feels like it should be possible. Would love if anyone could advise for some help here.
I'm afraid I don't know how to help, but maybe you can reach out to the rustdoc team on zulip.
@rustbot author
rustbot added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dylan-DPC added S-waiting-on-ACP
Status: PR has an ACP and is waiting for the ACP to complete.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
This comment has been minimized.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
📌 Commit 1ea6cd7 has been approved by cuviper
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
jhpratt added a commit to jhpratt/rust that referenced this pull request
Add std::ffi::c_str module
std::ffi
docs before change:
std::ffi
docs after change:
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
bors added a commit to rust-lang-ci/rust that referenced this pull request
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request
Add std::ffi::c_str module
std::ffi
docs before change:
std::ffi
docs after change:
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
bors added a commit to rust-lang-ci/rust that referenced this pull request
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
Add std::ffi::c_str module
std::ffi
docs before change:
std::ffi
docs after change:
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
bors added a commit to rust-lang-ci/rust that referenced this pull request
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
Add std::ffi::c_str module
std::ffi
docs before change:
std::ffi
docs after change:
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
jhpratt added a commit to jhpratt/rust that referenced this pull request
Add std::ffi::c_str module
std::ffi
docs before change:
std::ffi
docs after change:
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)
bors added a commit to rust-lang-ci/rust that referenced this pull request
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#112136 - clarfonthey:ffi-c_str, r=cuviper
Add std::ffi::c_str module
std::ffi
docs before change:
std::ffi
docs after change:
(note: I'm omitting the c_int
, etc. stuff from the screenshots since it's the same in both. this doesn't just delete those types)