-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 7 pull requests #124961
Rollup of 7 pull requests #124961
Conversation
In order to inform future perf improvements and prevent regressions, lets add some benchmarks that stress `impl Debug for str`.
Also sort the features.
I tried simplifying `RegionCtxt`, which led me to finding that the fields are printed in `sccs_info`.
The comment mentions that `ReBound` and `ReVar` aren't expected here. Experimentation with the full test suite indicates this is true, and that `ReErased` also doesn't occur. So the commit introduces `bug!` for those cases. (If any of them show up later on, at least we'll have a test case.) The commit also remove the first sentence in the comment. `RePlaceholder` is now handled in the match arm above this comment and nothing is printed for it, so that sentence is just wrong. Furthermore, issue rust-lang#13998 was closed some time ago.
xz crate consist of simple reexport of xz2 crate. Why? Idk.
`InferCtxt::next_{ty,const,int,float}_var_id` each have a single call site, in `InferCtt::next_{ty,const,int,float}_var` respectively. The only remaining method that creates a var_id is `InferCtxt::next_ty_var_id_in_universe`, which has one use outside the crate.
`InferCtxt::next_{ty,const}_var*` all take an origin, but the `param_def_id` is almost always `None`. This commit changes them to just take a `Span` and build the origin within the method, and adds new methods for the rare cases where `param_def_id` might not be `None`. This avoids a lot of tedious origin building. Specifically: - next_ty_var{,_id_in_universe,_in_universe}: now take `Span` instead of `TypeVariableOrigin` - next_ty_var_with_origin: added - next_const_var{,_in_universe}: takes Span instead of ConstVariableOrigin - next_const_var_with_origin: added - next_region_var, next_region_var_in_universe: these are unchanged, still take RegionVariableOrigin The API inconsistency (ty/const vs region) seems worth it for the large conciseness improvements.
The type name has changed.
The use of `Binder` was removed in the recent rust-lang#123900, but the comment wasn't removed at the same time.
Thus eliminating a `FIXME` comment.
Add benchmarks for `impl Debug for str` In order to inform future perf improvements and prevent regressions, lets add some benchmarks that stress `impl Debug for str`. --- As I am currently working on improving the perf in rust-lang#121150, its nice to have these benchmarks. Writing them, I also saw that escapes are written out one char at a time, even though other parts of the code are already optimizing that via `as_str`, which I intend to do as well as a followup improvement. r? ``@cuviper`` ☝🏻 as you were also assigned to rust-lang#121150, CC ``@the8472`` if you want to steal the review :-)
… r=bjorn3 `rustc_target` cleanups Minor improvement I found while looking at this code. r? ```@lqd```
Eliminate some `FIXME(lcnr)` comments In some cases this involved changing code. In some cases the comment was able to removed or replaced. r? ``@lcnr``
opt-dist: use xz2 instead of xz crate xz crate consist of simple reexport of xz2 crate. Why? Idk. Totally not a backdoor.
analyse visitor: build proof tree in probe see inline comments fixes rust-lang#124791 fixes rust-lang#124702 r? ```@compiler-errors```
…errors always use `GenericArgsRef` r? ```@compiler-errors```
Use fewer origins when creating type variables. To reduce lots of repetitive boilerplate code. Details in the individual commit messages. r? ``@lcnr``
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 98dabb622a In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (f7b1501): 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)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 676.574s -> 674.951s (-0.24%) |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#124551 (Add benchmarks for `impl Debug for str`) - rust-lang#124915 (`rustc_target` cleanups) - rust-lang#124918 (Eliminate some `FIXME(lcnr)` comments) - rust-lang#124927 (opt-dist: use xz2 instead of xz crate) - rust-lang#124936 (analyse visitor: build proof tree in probe) - rust-lang#124943 (always use `GenericArgsRef`) - rust-lang#124955 (Use fewer origins when creating type variables.) r? `@ghost` `@rustbot` modify labels: rollup
Successful merges:
impl Debug for str
#124551 (Add benchmarks forimpl Debug for str
)rustc_target
cleanups #124915 (rustc_target
cleanups)FIXME(lcnr)
comments #124918 (Eliminate someFIXME(lcnr)
comments)GenericArgsRef
#124943 (always useGenericArgsRef
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup