-
Notifications
You must be signed in to change notification settings - Fork 13.4k
don't use .into() to convert types into identical types. #69529
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
don't use .into() to convert types into identical types. #69529
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit 97710b4afb132c9a9c7f2818ccdb544ee59cc976 has been approved by |
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.
LGTM, only had one nit (due to let
-binding, which most of these don't do).
cc @alexcrichton @Mark-Simulacrum for the libstd
changes
cc @oli-obk @RalfJung for the miri changes
EDIT: whoops, too late!
6a701ed
to
3530b9a
Compare
reverted some changes to src/libstd/sys_common/process.rs |
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.
Miri changes LGTM
example: let s: String = format!("hello").into();
3530b9a
to
7be94a8
Compare
@bors r+ rollup |
📌 Commit 7be94a8 has been approved by |
Rollup of 9 pull requests Successful merges: - #69379 (Fail on multiple declarations of `main`.) - #69430 (librustc_typeck: remove loop that never actually loops) - #69449 (Do not ping PR reviewers in toolstate breakage) - #69491 (rustc_span: Add `Symbol::to_ident_string` for use in diagnostic messages) - #69495 (don't take redundant references to operands) - #69496 (use find(x) instead of filter(x).next()) - #69501 (note that find(f) is equivalent to filter(f).next() in the docs.) - #69527 (Ignore untracked paths when running `rustfmt` on repository.) - #69529 (don't use .into() to convert types into identical types.) Failed merges: r? @ghost
This removes redundant
.into()
calls.example:
let s: String = format!("hello").into();