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

Rollup of 7 pull requests #124961

Merged
merged 22 commits into from
May 10, 2024
Merged

Rollup of 7 pull requests #124961

merged 22 commits into from
May 10, 2024

Commits on May 1, 2024

  1. 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`.
    Swatinem committed May 1, 2024
    Configuration menu
    Copy the full SHA
    5fe296c View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Remove unused step_trait feature.

    Also sort the features.
    nnethercote committed May 8, 2024
    Configuration menu
    Copy the full SHA
    56dc98b View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Configuration menu
    Copy the full SHA
    69b86f6 View commit details
    Browse the repository at this point in the history
  2. Correct a comment.

    I tried simplifying `RegionCtxt`, which led me to finding that the
    fields are printed in `sccs_info`.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    609b9a6 View commit details
    Browse the repository at this point in the history
  3. Fix up DescriptionCtx::new.

    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.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    d6c63bd View commit details
    Browse the repository at this point in the history
  4. opt-dist: use xz2 instead of xz crate

    xz crate consist of simple reexport of xz2 crate. Why? Idk.
    klensy committed May 9, 2024
    Configuration menu
    Copy the full SHA
    39159a3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    83e6da0 View commit details
    Browse the repository at this point in the history
  6. update crashes

    lcnr committed May 9, 2024
    Configuration menu
    Copy the full SHA
    feff752 View commit details
    Browse the repository at this point in the history
  7. always use GenericArgsRef

    lcnr committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8f90625 View commit details
    Browse the repository at this point in the history
  8. Inline and remove unused methods.

    `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.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    11f2ca3 View commit details
    Browse the repository at this point in the history
  9. Use fewer origins when creating type variables.

    `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.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    fe843fe View commit details
    Browse the repository at this point in the history
  10. Fix out-of-date comment.

    The type name has changed.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5b5dd1b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d13612b View commit details
    Browse the repository at this point in the history
  12. Remove out-of-date comment.

    The use of `Binder` was removed in the recent rust-lang#123900, but the comment
    wasn't removed at the same time.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    24445d3 View commit details
    Browse the repository at this point in the history
  13. De-tuple two vtable_trait_first_method_offset args.

    Thus eliminating a `FIXME` comment.
    nnethercote committed May 9, 2024
    Configuration menu
    Copy the full SHA
    df6f713 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Rollup merge of rust-lang#124551 - Swatinem:debug-str-bench, r=cuviper

    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 :-)
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    f3f9f0c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#124915 - nnethercote:rustc_target-cleanups,…

    … r=bjorn3
    
    `rustc_target` cleanups
    
    Minor improvement I found while looking at this code.
    
    r? ```@lqd```
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    0b4715e View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#124918 - nnethercote:FIXME-lcnr, r=lcnr

    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``
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    7e4f608 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#124927 - klensy:xz3, r=Kobzol

    opt-dist: use xz2 instead of xz crate
    
    xz crate consist of simple reexport of xz2 crate. Why? Idk.
    
    Totally not a backdoor.
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    4313281 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#124936 - lcnr:cool-beans, r=compiler-errors

    analyse visitor: build proof tree in probe
    
    see inline comments
    
    fixes rust-lang#124791
    fixes rust-lang#124702
    
    r? ```@compiler-errors```
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    43ddd1d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#124943 - lcnr:generic-args-ref, r=compiler-…

    …errors
    
    always use `GenericArgsRef`
    
    r? ```@compiler-errors```
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    30bd6cb View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#124955 - nnethercote:next_ty_var, r=lcnr

    Use fewer origins when creating type variables.
    
    To reduce lots of repetitive boilerplate code. Details in the individual commit messages.
    
    r? ``@lcnr``
    matthiaskrgr authored May 10, 2024
    Configuration menu
    Copy the full SHA
    0ee2580 View commit details
    Browse the repository at this point in the history