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 6 pull requests #127014

Merged
merged 17 commits into from
Jun 27, 2024
Merged

Rollup of 6 pull requests #127014

merged 17 commits into from
Jun 27, 2024

Commits on Jun 23, 2024

  1. Fix a typo in a comment.

    nnethercote committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    aa30dd4 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Extend tests/ui/macros/nonterminal-matching.rs.

    To involve `macro_rules!` macros, and also a mix of fragment specifiers,
    some of which feature the forwaring limitation and some of which don't.
    nnethercote committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    bca5cd3 View commit details
    Browse the repository at this point in the history
  2. Extra panic cases.

    Just some extra sanity checking, making explicit some values not
    possible in code working with token trees -- we shouldn't be seeing
    explicit delimiter tokens, because they should be represented as
    `TokenTree::Delimited`.
    nnethercote committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    2e4d547 View commit details
    Browse the repository at this point in the history
  3. Remove __rust_force_expr.

    This was added (with a different name) to improve an error message. It
    is no longer needed -- removing it changes the error message, but overall
    I think the new message is no worse:
    - the mention of `#` in the first line is a little worse,
    - but the extra context makes it very clear what the problem is, perhaps
      even clearer than the old message,
    - and the removal of the note about the `expr` fragment (an internal
      detail of `__rust_force_expr`) is an improvement.
    
    Overall I think the error is quite clear and still far better than the
    old message that prompted rust-lang#61933, which didn't even mention patterns.
    
    The motivation for this is rust-lang#124141, which will cause pasted
    metavariables to be tokenized and reparsed instead of the AST node being
    cached. This change in behaviour occasionally has a non-zero perf cost,
    and `__rust_force_expr` causes the tokenize/reparse step to occur twice.
    Removing `__rust_force_expr` greatly reduces the extra overhead for the
    `deep-vector` benchmark.
    nnethercote committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    9828e96 View commit details
    Browse the repository at this point in the history
  4. Inline and remove maybe_whole_expr!.

    And remove the `NtPath` and `NtBlock` cases in
    `parse_literal_maybe_minus`, because they are unnecessary.
    nnethercote committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    379b761 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Configuration menu
    Copy the full SHA
    457fda1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3262611 View commit details
    Browse the repository at this point in the history
  3. coverage: Allow #[coverage(..)] on impl and mod

    These attributes apply to all enclosed functions/methods/closures, unless
    explicitly overridden by another coverage attribute.
    Zalathar committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7f37f8a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e5167fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5aac249 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    518b74e View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Rollup merge of rust-lang#126571 - nnethercote:less-maybe_whole-expr-…

    …2, r=petrochenkov
    
    Less `maybe_whole_expr`, take 2
    
    I first tried this in rust-lang#107550. I now think it's worth doing again, as a precursor to rust-lang#124141.
    
    r? ```@petrochenkov```
    jhpratt authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    5ec93b8 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#126721 - Zalathar:nested-cov-attr, r=oli-obk

    coverage: Make `#[coverage(..)]` apply recursively to nested functions
    
    This PR makes the (currently-unstable) `#[coverage(off)]` and `#[coverage(on)]` attributes apply recursively to all nested functions/closures, instead of just the function they are directly attached to.
    
    Those attributes can now also be applied to modules and to impl/impl-trait blocks, where they have no direct effect, but will be inherited by all enclosed functions/closures/methods that don't override the inherited value.
    
    ---
    
    Fixes rust-lang#126625.
    jhpratt authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    70b69a2 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#126928 - nnethercote:124141-pre, r=oli-obk

    Some `Nonterminal` removal precursors
    
    Small things to prepare for rust-lang#124141, more or less.
    
    r? ```@oli-obk```
    jhpratt authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    b1f4397 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#126929 - nnethercote:rm-__rust_force_expr, …

    …r=oli-obk
    
    Remove `__rust_force_expr`.
    
    This was added (with a different name) to improve an error message. It is no longer needed -- removing it changes the error message, but overall I think the new message is no worse:
    - the mention of `#` in the first line is a little worse,
    - but the extra context makes it very clear what the problem is, perhaps even clearer than the old message,
    - and the removal of the note about the `expr` fragment (an internal detail of `__rust_force_expr`) is an improvement.
    
    Overall I think the error is quite clear and still far better than the old message that prompted rust-lang#61933, which didn't even mention patterns.
    
    The motivation for this is rust-lang#124141, which will cause pasted metavariables to be tokenized and reparsed instead of the AST node being cached. This change in behaviour occasionally has a non-zero perf cost, and `__rust_force_expr` causes the tokenize/reparse step to occur twice. Removing `__rust_force_expr` greatly reduces the extra overhead for the `deep-vector` benchmark.
    
    r? ```@oli-obk```
    jhpratt authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    d3debc0 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#126980 - Borgerr:fix-extendfromslice-check,…

    … r=workingjubilee
    
    set self.is_known_utf8 to false in extend_from_slice
    
    try-job: x86_64-msvc
    
    closes rust-lang#126977
    Related to rust-lang#126885, rust-lang#126333, and [this conversation](<rust-lang@aa46a33#r143539097>)
    jhpratt authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    8905be5 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#126983 - tgross35:f16-f128-smir, r=celinval

    Remove `f16` and `f128` ICE paths from smir
    
    Just chasing down some possible ICE paths. ```@compiler-errors``` mentioned in rust-lang#121728 (comment) that it is okay not to support these in smir, but this change seems pretty trivial?
    
    r? ```@celinval``` since you reviewed rust-lang#114607 (review)
    jhpratt authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    73016dc View commit details
    Browse the repository at this point in the history