Document that CStr::as_ptr returns a type alias#108124
Merged
bors merged 1 commit intorust-lang:masterfrom Feb 20, 2023
Merged
Conversation
Collaborator
|
r? @thomcc (rustbot has picked a reviewer for you, use r? to override) |
Collaborator
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Member
|
Looks fine, even if that bug is fixed this isn't a problem. @bors r+ rollup |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 20, 2023
Document that CStr::as_ptr returns a type alias Rustdoc resolves type aliases too eagerly rust-lang#15823 which makes the [std re-export](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.as_ptr) of `CStr::as_ptr` show `i8` instead of `c_char`. To work around this I've added info about `c_char` in the method's description. BTW, I've also added a comment to what-not-to-do example in case someone copypasted it without reading the surrounding text.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 20, 2023
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#108124 (Document that CStr::as_ptr returns a type alias) - rust-lang#108171 (Improve building compiler artifacts output) - rust-lang#108200 (Use restricted Damerau-Levenshtein distance for diagnostics) - rust-lang#108259 (remove FIXME that doesn't require fixing) - rust-lang#108265 ("`const` generic" -> "const parameter") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rustdoc resolves type aliases too eagerly #15823 which makes the std re-export of
CStr::as_ptrshowi8instead ofc_char. To work around this I've added info aboutc_charin the method's description.BTW, I've also added a comment to what-not-to-do example in case someone copypasted it without reading the surrounding text.