Skip to content
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

inline format!() args #114019

Closed

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 24, 2023

See https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Opening.20.60E-easy.60.20meta.20issue.28s.29.20for.20small.20tweaks.3F

Edit: this is not complete yet because clippy hans at some point, I'm patching out the responsible lint and will update later

@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 24, 2023
@@ -1129,10 +1129,10 @@ impl fmt::Debug for Duration {

// If the user request a precision > 9, we pad '0's at the end.
let w = f.precision().unwrap_or(pos);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let w = f.precision().unwrap_or(pos);
let width = f.precision().unwrap_or(pos);

for better legibility?

@petrochenkov petrochenkov marked this pull request as ready for review July 24, 2023 16:14
@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2023

Some changes occurred in need_type_info.rs

cc @lcnr

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Changes rustc_apfloat. rustc_apfloat is currently in limbo and you almost certainly don't want to change it (see #55993).

cc @eddyb

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @TaKO8Ki

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 24, 2023
@saethlin
Copy link
Member

Can you split this up into multiple PRs? There's no reason we need to land changes to every part of the codebase at the same time.

@matthiaskrgr matthiaskrgr force-pushed the rustc_uninlined_format branch from 5c4c3aa to 543feca Compare July 24, 2023 16:35
@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes might have occurred in exhaustiveness checking

cc @Nadrieril

This PR changes Stable MIR

cc @oli-obk, @celinval, @spastorino

@matthiaskrgr
Copy link
Member Author

@saethlin what do you have in mind? one pr per crate?

Anyway I want to do a all-in-one perf run to see if this has some sneaky sideeffects.

@matthiaskrgr
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 24, 2023
@bors
Copy link
Contributor

bors commented Jul 24, 2023

⌛ Trying commit 543feca with merge 0c93b338030414ebd7b082f1eb6b5ebae21a097d...

@bors
Copy link
Contributor

bors commented Jul 24, 2023

☀️ Try build successful - checks-actions
Build commit: 0c93b338030414ebd7b082f1eb6b5ebae21a097d (0c93b338030414ebd7b082f1eb6b5ebae21a097d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0c93b338030414ebd7b082f1eb6b5ebae21a097d): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.9%, -0.8%] 4
Improvements ✅
(secondary)
-0.5% [-0.8%, -0.3%] 12
All ❌✅ (primary) -0.8% [-0.9%, -0.8%] 4

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.2% [-1.2%, -1.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-1.2%, 2.4%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 653.19s -> 650.692s (-0.38%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 24, 2023
@matthiaskrgr
Copy link
Member Author

🤔 interesting

Comment on lines -573 to -575
write!(f, "{:+}", exp)?;
write!(f, "{exp:+}")?;
} else {
write!(f, "{:+03}", exp)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think apfloat changes need to be reverted?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if that is still the case, cc @eddyb

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it does make sense to leave this out of this PR, because it at least requires a submodule? update

@WaffleLapkin
Copy link
Member

r? WaffleLapkin

+1 to @saethlin's proposal of splitting this up.
@matthiaskrgr I think you can bundle multiple crates at a time, just making sure the diff is < 500 lines or something, so it's easier to review changes, rebase the PR when/if needed and fixup nits.

@Noratrieb
Copy link
Member

note #105890
I don't think it's worth converting legacy translations, that will just cause conflicts.
so you should probably see which crates/modules now have the denys and only apply those.

@WaffleLapkin
Copy link
Member

This was splitup into #114066, #114067, #114068, #114074, #114075, as such — closing.

@lcnr lcnr removed the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.