-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Avoid ref when using format! in src #127984
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
Conversation
r? @onur-ozkan rustbot has assigned @onur-ozkan. Use |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. Some changes occurred in src/tools/compiletest cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse.
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
@bors r+ rollup |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#123196 (Add Process support for UEFI) - rust-lang#127556 (Replace a long inline "autoref" comment with method docs) - rust-lang#127693 (Migrate `crate-hash-rustc-version` to `rmake`) - rust-lang#127866 (Conditionally build `wasm-component-ld` ) - rust-lang#127918 (Safely enforce thread name requirements) - rust-lang#127948 (fixes panic error `index out of bounds` in conflicting error) - rust-lang#127980 (Avoid ref when using format! in compiler) - rust-lang#127984 (Avoid ref when using format! in src) - rust-lang#127987 (More accurate suggestion for `-> Box<dyn Trait>` or `-> impl Trait`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#123196 (Add Process support for UEFI) - rust-lang#127556 (Replace a long inline "autoref" comment with method docs) - rust-lang#127693 (Migrate `crate-hash-rustc-version` to `rmake`) - rust-lang#127866 (Conditionally build `wasm-component-ld` ) - rust-lang#127918 (Safely enforce thread name requirements) - rust-lang#127948 (fixes panic error `index out of bounds` in conflicting error) - rust-lang#127980 (Avoid ref when using format! in compiler) - rust-lang#127984 (Avoid ref when using format! in src) - rust-lang#127987 (More accurate suggestion for `-> Box<dyn Trait>` or `-> impl Trait`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127984 - nyurik:src-refs, r=onur-ozkan Avoid ref when using format! in src Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse. See also rust-lang/rust-clippy#10851
Clean up a few minor refs in
format!
macro, as it has a performance cost. Apparently the compiler is unable to inlineformat!("{}", &variable)
, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental&
misuse.See also rust-lang/rust-clippy#10851