-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove some uses of try! #56419
Remove some uses of try! #56419
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Thanks! @bors r+ rollup |
📌 Commit e7e9692 has been approved by |
Remove some uses of try!
@@ -278,14 +278,14 @@ macro_rules! debug_assert_ne { | |||
/// | |||
/// // The previous method of quick returning Errors | |||
/// fn write_to_file_using_try() -> Result<(), MyError> { | |||
/// let mut file = try!(File::create("my_best_friends.txt")); | |||
/// try!(file.write_all(b"This is a list of my best friends.")); | |||
/// let mut file = r#try!(File::create("my_best_friends.txt")); |
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.
Is the change to the docs intended? If so, it might make sense to also explain or reference the raw literal syntax in the text above, as it may be a bit obscure for this rather prominent piece of documentation.
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.
This macro is deprecated (and further more try!
doesn't even work on Rust 2018). Therefore it is not a prominent piece of documentation other than explaining that it is deprecated; but sure -- we can clarify the raw identifier syntax later (in a follow up PR -- which maybe @mark-i-m can fix up); the purpose r#
fills here is to make code work on both editions (a good thing) so this is a strict improvement.
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.
Yes, the change was intended so that it works in both editions. Opened #56424
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!
Remove some uses of try!
Mention raw-ident syntax According to rust-lang#56419 (review) Blocked on rust-lang#56419 r? @Centril
Rollup of 14 pull requests Successful merges: - #56110 (Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks) - #56305 (update miri) - #56366 (Stabilize self_in_typedefs feature) - #56372 (Refer to the second borrow as the "second borrow" in E0501.rs) - #56394 (Deal with EINTR in net timeout tests) - #56395 (Stabilize dbg!(...)) - #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block) - #56402 (Improve the unstable book example for #[marker] trait) - #56412 (Update tracking issue for `extern_crate_self`) - #56416 (Remove unneeded body class selector) - #56418 (Fix failing tidy (line endings on Windows)) - #56419 (Remove some uses of try!) - #56424 (Mention raw-ident syntax) - #56432 (Update issue number of `shrink_to` methods to point the tracking issue) Failed merges: r? @ghost
Remove some uses of try!
Rollup of 13 pull requests Successful merges: - #56141 ([std] Osstr len clarity) - #56366 (Stabilize self_in_typedefs feature) - #56395 (Stabilize dbg!(...)) - #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block) - #56402 (Improve the unstable book example for #[marker] trait) - #56412 (Update tracking issue for `extern_crate_self`) - #56416 (Remove unneeded body class selector) - #56418 (Fix failing tidy (line endings on Windows)) - #56419 (Remove some uses of try!) - #56432 (Update issue number of `shrink_to` methods to point the tracking issue) - #56433 (Add description about `crate` for parse_visibility's comment) - #56435 (make the C part of compiler-builtins opt-out) - #56438 (Remove not used `DotEq` token) Failed merges: r? @ghost
Mention raw-ident syntax According to rust-lang#56419 (review) Blocked on rust-lang#56419 r? @Centril
Mention raw-ident syntax According to rust-lang#56419 (review) Blocked on rust-lang#56419 r? @Centril
Mention raw-ident syntax According to rust-lang#56419 (review) Blocked on rust-lang#56419 r? @Centril
Mention raw-ident syntax According to rust-lang#56419 (review) Blocked on rust-lang#56419 r? @Centril
Mention raw-ident syntax According to rust-lang#56419 (review) Blocked on rust-lang#56419 r? @Centril
No description provided.