Split some functions with many arguments into builder pattern functions by oli-o...
source link: https://github.com/rust-lang/rust/pull/114054
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Split some functions with many arguments into builder pattern functions #114054
Merged
Conversation
Collaborator
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Collaborator
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
This comment has been minimized.
added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
labels
Collaborator
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
Contributor
Author
This comment has been minimized.
added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
This comment has been minimized.
compiler/rustc_expand/src/tests.rs
Outdated
let handler = Handler::with_emitter(true, None, Box::new(emitter), None); |
||
let emitter = |
||
EmitterWriter::new(Box::new(Shared { data: output.clone() }), fallback_bundle, false) |
||
.sm(Some(source_map.clone())); |
Contributor
Surprised that .sm(Some(source_map))
is needed here, instead of .sm(source_map)
.
Contributor
Author
The macro supports this, but most of the callers actually provide an Option
, so this is a tradeoff unless we wanna go generic
Contributor
In that case, r=me after you're done with timer
compiler/rustc_errors/src/emitter.rs
Outdated
pub struct EmitterWriter { |
||
#[setters(skip)] |
||
dst: Destination, |
||
sm: Option<Lrc<SourceMap>>, |
Contributor
Re: my other comment, we can use #[setters(strip_option)]
here.
Contributor
Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Contributor
Author
ugh. in-tree rustfmt requires formatting, but doesn't get formatted with |
yep, it's a consequence that's part of the tradeoffs of moving tools (including rustfmt) to subtrees, and this repo continuing the model of being pinned to an older version of rustfmt vs. using in-tree rustfmt. more discussion in #90672 |
Collaborator
Finished benchmarking commit (9440ad6): comparison URL. Overall result: improvements - no action neededBenchmarking 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 Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 651.438s -> 651.998s (0.09%) |
removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label
Contributor
Author
@bors r=estebank |
added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
Test successful - checks-actions |
Collaborator
Finished benchmarking commit (52bdc37): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 652.439s -> 650.097s (-0.36%) |
@@ -430,6 +430,10 @@ impl Step for Rustfmt { | ||
&[], |
||
); |
||
if builder.config.cmd.bless() { |
||
cargo.env("BLESS", "1"); |
@oli-obk - This seems reasonable to me, though I'd like to change the var name to be a little more explicit (perhaps something like RUSTC_BLESS
?) so that it's somewhat more explicit especially when working with rustfmt out of tree.
Wanted to make sure you didn't have any objections or alternative naming suggestions before I opened a PR?
Contributor
Author
This is currently being worked on in #113298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK