-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Added docs for From<c_int>
for ExitStatus
#74291
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
To be honest, I don't think this particular documentation adds any valuable information. It would be better if you would mention the cost of the conversion (basically free as far as I can see), so that the doc comment has at least more information than the impl
header already contains.
Thanks a fair point, @LukasKalbertodt! I'd argue though that it does add something by hinting at it being a "type-safety" conversion. (Technically it is "copying" in the Rust sense, but several other doc comments use "copying" to imply |
Yeah but this "type-safe" thing also kind of bothers me :/ And yes, "copy" is also slightly problematic. Sorry for being so picky! What do you think about this?
|
"Very cheap" is very subjective though, isn't it? Cheap relative to what exactly? So how about something like… ?
|
Yeah, true, "very cheap" is not optimal. "near zero overhead" makes one think "overhead over what" though. Mh. I'm probably overthinking this, sorry :D |
For me it's good as is. 😆 Let's merge it then! @bors: r+ rollup |
📌 Commit 538f157 has been approved by |
…arth Rollup of 14 pull requests Successful merges: - rust-lang#72973 (RISC-V GNU/Linux as host platform) - rust-lang#73918 (Clean up E0715 explanation) - rust-lang#73959 (Clean up E0716 explanation) - rust-lang#74119 (Remove `Compiler::compile()`.) - rust-lang#74196 (Add option to collapse automatically implementors) - rust-lang#74218 (Add margin after doc search results) - rust-lang#74276 (improve DiscriminantKind handling) - rust-lang#74291 (Added docs for `From<c_int>` for `ExitStatus`) - rust-lang#74294 (Update cross-compilation README) - rust-lang#74337 (Handle case of incomplete local ty more gracefully) - rust-lang#74344 (Remove string comparison and use diagnostic item instead) - rust-lang#74347 (Initialize default providers only once) - rust-lang#74353 (Edit docs for rustc_middle::dep_graph::dep_node) - rust-lang#74374 (Add a 1.45 release note on lto vs. embed-bitcode) Failed merges: - rust-lang#74251 (Teach bootstrap about target files vs target triples) r? @ghost
Partially addresses #51430