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 9 pull requests #127896

Closed
wants to merge 29 commits into from
Closed

Commits on Jul 16, 2024

  1. Remove an unnecessary ?.

    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    2f305ff View commit details
    Browse the repository at this point in the history
  2. Inline Parser::parse_item_common_.

    It has a single call site, it isn't that big, and its name is
    confusingly similar to `Parser::parse_item_common`.
    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    48cdfc3 View commit details
    Browse the repository at this point in the history
  3. Reorder Parser::parse_expr_dot_or_call_with arguments.

    Put `attrs` before `e0` because that matches the order in the source
    code, where outer attributes appear before expressions.
    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    d247489 View commit details
    Browse the repository at this point in the history
  4. Inline and remove Parser::parse_and_disallow_postfix_after_cast.

    It has a single call site. Removing it removes the need for an
    `ExprKind` check. The commit also clarifies the relevant comment.
    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    96cc9c9 View commit details
    Browse the repository at this point in the history
  5. Inline and remove Parser::parse_expr_dot_or_call_with_.

    It only has two call sites, and it extremely similar to
    `Parser::parse_expr_dot_or_call_with`, in both name and behaviour. The
    only difference is the latter has an `attrs` argument and an
    `ensure_sufficient_stack` call. We can pass in an empty `attrs` as
    necessary, as is already done at some `parse_expr_dot_or_call_with` call
    sites.
    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    96b39f1 View commit details
    Browse the repository at this point in the history
  6. Fix a comment.

    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    8cb6bc3 View commit details
    Browse the repository at this point in the history
  7. Remove references to maybe_whole_expr.

    It was removed in rust-lang#126571.
    nnethercote committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    9c4f3db View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Configuration menu
    Copy the full SHA
    538b31e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2162f3f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a651050 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8d90f44 View commit details
    Browse the repository at this point in the history
  5. Fix relations

    compiler-errors committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    0b5ce54 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5483945 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f54fa62 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a9e1466 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a8b6e3f View commit details
    Browse the repository at this point in the history
  10. Fix associated item removal suggestion

    We were previously telling people to write what was already there, instead of removal.
    
    ```
    error[E0229]: associated item constraints are not allowed here
      --> $DIR/E0229.rs:13:25
       |
    LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
       |                         ^^^^^^^ associated item constraint not allowed here
       |
    help: consider removing this associated item binding
       |
    LL - fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
    LL + fn baz<I>(x: &<I as Foo>::A) {}
       |
    ```
    estebank committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    e38032f View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Accurate use rename suggestion span

    When suggesting to rename an import with `as`, use a smaller span to
    render the suggestion with a better format:
    
    ```
    error[E0252]: the name `baz` is defined multiple times
      --> $DIR/issue-25396.rs:4:5
       |
    LL | use foo::baz;
       |     -------- previous import of the module `baz` here
    LL | use bar::baz;
       |     ^^^^^^^^ `baz` reimported here
       |
       = note: `baz` must be defined only once in the type namespace of this module
    help: you can use `as` to change the binding name of the import
       |
    LL | use bar::baz as other_baz;
       |              ++++++++++++
    ```
    estebank committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    8eb5185 View commit details
    Browse the repository at this point in the history
  2. More accurate span for type parameter suggestion

    After:
    
    ```
    error[E0229]: associated item constraints are not allowed here
      --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
       |
    LL | impl Foo<T: Default> for String {}
       |          ^^^^^^^^^^ associated item constraint not allowed here
       |
    help: declare the type parameter right after the `impl` keyword
       |
    LL - impl Foo<T: Default> for String {}
    LL + impl<T: Default> Foo<T> for String {}
       |
    ```
    
    Before:
    
    ```
    error[E0229]: associated item constraints are not allowed here
      --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
       |
    LL | impl Foo<T: Default> for String {}
       |          ^^^^^^^^^^ associated item constraint not allowed here
       |
    help: declare the type parameter right after the `impl` keyword
       |
    LL | impl<T: Default> Foo<T> for String {}
       |     ++++++++++++     ~
    ```
    estebank committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    be9d961 View commit details
    Browse the repository at this point in the history
  3. More accurate span for anonymous argument suggestion

    Use smaller span for suggesting adding `_:` ahead of a type:
    
    ```
    error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
      --> $DIR/anon-params-denied-2018.rs:12:47
       |
    LL |     fn foo_with_qualified_path(<Bar as T>::Baz);
       |                                               ^ expected one of 8 possible tokens
       |
       = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
    help: explicitly ignore the parameter name
       |
    LL |     fn foo_with_qualified_path(_: <Bar as T>::Baz);
       |                                ++
    ```
    estebank committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    f6c4679 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#127077 - tbu-:pr_doc_fd_to_owned, r=working…

    …jubilee
    
    Make language around `ToOwned` for `BorrowedFd` more precise
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    483161d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#127523 - Oneirical:treasure-test, r=jieyouxu

    Migrate `dump-ice-to-disk` and `panic-abort-eh_frame` `run-make` tests to rmake
    
    Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
    
    Please try:
    
    try-job: x86_64-msvc
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    c0cd3ca View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#127787 - Rejyr:migrate-atomic-lock-free-rma…

    …ke, r=jieyouxu
    
    Migrate `atomic-lock-free` to `rmake`
    
    Also adds `llvm_components_contain` to `run-make-support`.
    
    Part of rust-lang#121876.
    
    r? `@jieyouxu`
    
    try-job: dist-x86_64-linux
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    af30f40 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#127806 - nnethercote:parser-improvements, r…

    …=spastorino
    
    Some parser improvements
    
    I was looking closely at attribute handling in the parser while debugging some issues relating to rust-lang#124141, and found a few small improvements.
    
    ```@spastorino```
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    caf888c View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#127810 - compiler-errors:less-tcx, r=lcnr

    Rename `tcx` to `cx` in `rustc_type_ir`
    
    Self-explanatory. Forgot that we had to do this in type_ir too, and not just the new solver crate lol.
    
    r? lcnr
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    fe9940c View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#127878 - estebank:assoc-item-removal, r=fmease

    Fix associated item removal suggestion
    
    We were previously telling people to write what was already there, instead of removal (treating it as a `help`). We now properly suggest to remove the code that needs to be removed.
    
    ```
    error[E0229]: associated item constraints are not allowed here
      --> $DIR/E0229.rs:13:25
       |
    LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
       |                         ^^^^^^^ associated item constraint not allowed here
       |
    help: consider removing this associated item binding
       |
    LL - fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
    LL + fn baz<I>(x: &<I as Foo>::A) {}
       |
    ```
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    9b001ce View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#127886 - estebank:as-rename-suggestion, r=c…

    …ompiler-errors
    
    Accurate `use` rename suggestion span
    
    When suggesting to rename an import with `as`, use a smaller span to render the suggestion with a better format:
    
    ```
    error[E0252]: the name `baz` is defined multiple times
      --> $DIR/issue-25396.rs:4:5
       |
    LL | use foo::baz;
       |     -------- previous import of the module `baz` here
    LL | use bar::baz;
       |     ^^^^^^^^ `baz` reimported here
       |
       = note: `baz` must be defined only once in the type namespace of this module
    help: you can use `as` to change the binding name of the import
       |
    LL | use bar::baz as other_baz;
       |              ++++++++++++
    ```
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    a5fd37e View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#127888 - estebank:type-param-sugg, r=compil…

    …er-errors
    
    More accurate span for type parameter suggestion
    
    After:
    
    ```
    error[E0229]: associated item constraints are not allowed here
      --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
       |
    LL | impl Foo<T: Default> for String {}
       |          ^^^^^^^^^^ associated item constraint not allowed here
       |
    help: declare the type parameter right after the `impl` keyword
       |
    LL - impl Foo<T: Default> for String {}
    LL + impl<T: Default> Foo<T> for String {}
       |
    ```
    
    Before:
    
    ```
    error[E0229]: associated item constraints are not allowed here
      --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
       |
    LL | impl Foo<T: Default> for String {}
       |          ^^^^^^^^^^ associated item constraint not allowed here
       |
    help: declare the type parameter right after the `impl` keyword
       |
    LL | impl<T: Default> Foo<T> for String {}
       |     ++++++++++++     ~
    ```
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    1bdc0fb View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#127889 - estebank:anon-arg-sugg, r=compiler…

    …-errors
    
    More accurate span for anonymous argument suggestion
    
    Use smaller span for suggesting adding `_:` ahead of a type:
    
    ```
    error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
      --> $DIR/anon-params-denied-2018.rs:12:47
       |
    LL |     fn foo_with_qualified_path(<Bar as T>::Baz);
       |                                               ^ expected one of 8 possible tokens
       |
       = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
    help: explicitly ignore the parameter name
       |
    LL |     fn foo_with_qualified_path(_: <Bar as T>::Baz);
       |                                ++
    ```
    tgross35 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    6973719 View commit details
    Browse the repository at this point in the history