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 #111960

Merged
merged 20 commits into from
May 26, 2023
Merged

Rollup of 7 pull requests #111960

merged 20 commits into from
May 26, 2023

Commits on May 19, 2023

  1. Consider lint check attributes on match arms in late lints

    Additionally add analogous test for early lints.
    lowr committed May 19, 2023
    Configuration menu
    Copy the full SHA
    ddafe23 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3a03587 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. update pulldown-cmark to 0.9.3

    Lukas Markeffsky committed May 22, 2023
    Configuration menu
    Copy the full SHA
    cb2ba42 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b63cc5c View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Configuration menu
    Copy the full SHA
    3d11b65 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fd5fa01 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. Configuration menu
    Copy the full SHA
    4692375 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    223f6f5 View commit details
    Browse the repository at this point in the history
  3. rustdoc: add test for strikethrough with single tildes

    Also merge the two almost identical strikethrough tests together and document what the test tests.
    Lukas Markeffsky committed May 25, 2023
    Configuration menu
    Copy the full SHA
    28ce0b9 View commit details
    Browse the repository at this point in the history
  4. rustdoc book: document single tilde strikethrough

    Lukas Markeffsky committed May 25, 2023
    Configuration menu
    Copy the full SHA
    c2a446a View commit details
    Browse the repository at this point in the history
  5. Remove ExpnKind::Inlined.

    cjgillot committed May 25, 2023
    Configuration menu
    Copy the full SHA
    0919ec3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3a423c3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ace794c View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#107522 - Sp00ph:introselect, r=Amanieu

    Add Median of Medians fallback to introselect
    
    Fixes rust-lang#102451.
    
    This PR is a follow up to rust-lang#106997. It adds a Fast Deterministic Selection implementation as a fallback to the introselect algorithm used by `select_nth_unstable`. This allows it to guarantee O(n) worst case running time, while maintaining good performance in all cases.
    
    This would fix rust-lang#102451, which was opened because the `select_nth_unstable` docs falsely claimed that it had O(n) worst case performance, even though it was actually quadratic in the worst case. rust-lang#106997 improved the worst case complexity to O(n log n) by using heapsort as a fallback, and this PR further improves it to O(n) (this would also make rust-lang#106933 unnecessary).
    It also improves the actual runtime if the fallback gets called: Using a pathological input of size `1 << 19` (see the playground link in rust-lang#102451), calculating the median is roughly 3x faster using fast deterministic selection as a fallback than it is using heapsort.
    
    The downside to this is less code reuse between the sorting and selection algorithms, but I don't think it's that bad. The additional algorithms are ~250 LOC with no `unsafe` blocks (I tried using unsafe to avoid bounds checks but it didn't noticeably improve the performance).
    I also let it fuzz for a while against the current `select_nth_unstable` implementation to ensure correctness, and it seems to still fulfill all the necessary postconditions.
    
    cc `@scottmcm` who reviewed rust-lang#106997
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    fb45513 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#111152 - lukas-code:markdown-parsers-are-ha…

    …rd, r=GuillaumeGomez
    
    update `pulldown-cmark` to `0.9.3`
    
    This PR updates `pulldown-cmark` to version `0.9.3`, which does two main things:
    * Pulls in pulldown-cmark/pulldown-cmark#643 to fix rust-lang#111117
    * Allows parsing strikethrough with single tildes, e.g. `~foo~` -> ~foo~. This matches the [GFM spec](https://github.github.com/gfm/#strikethrough-extension-).
    
    Full changelog: pulldown-cmark/pulldown-cmark#646
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    bd7e8b5 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#111757 - lowr:fix/lint-attr-on-match-arm, r…

    …=eholk
    
    Consider lint check attributes on match arms
    
    Currently, lint check attributes on match arms have no effect for some lints. This PR makes some lint passes to take those attributes into account.
    
    - `LateContextAndPass` for late lint doesn't update `last_node_with_lint_attrs` when it visits match arms. This leads to lint check attributes on match arms taking no effects on late lints that operate on the arms' pattern:
    
      ```rust
      match value {
          #[deny(non_snake_case)]
          PAT => {} // `non_snake_case` only warned due to default lint level
      }
      ```
    
      To be honest, I'm not sure whether this is intentional or just an oversight. I've dug the implementation history and searched up issues/PRs but couldn't find any discussion on this.
    
    - `MatchVisitor` doesn't update its lint level when it visits match arms. This leads to check lint attributes on match arms taking no effect on some lints handled by this visitor, namely: `bindings_with_variant_name` and `irrefutable_let_patterns`.
    
      This seems to be a fallout from rust-lang#108504. Before 05082f5, when the visitor operated on HIR rather than THIR, check lint attributes for the said lints were effective. [This playground][play] compiles successfully on current stable (1.69) but fails on current beta and nightly.
    
      I wasn't sure where best to place the test for this. Let me know if there's a better place.
    
    [play]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=38432b79e535cb175f8f7d6d236d29c3
    [play-match]: https://play.rust-lang.org/?version=beta&mode=debug&edition=2021&gist=629aa71b7c84b269beadeba664e2221d
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    9d4527b View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#111831 - clubby789:capture-slice-pat, r=cjg…

    …illot
    
    Always capture slice when pattern requires checking the length
    
    Fixes rust-lang#111751
    
    cc ``@zirconium-n,`` I see you were assigned to this but I've fixed some similar issues in the past and had an idea on how to investigate this.
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    dbdb509 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#111929 - compiler-errors:no-newline-apit, r…

    …=wesleywiser
    
    Don't print newlines in APITs
    
    This is kind of a hack, but it gets the job done because the only "special" formatting that (afaict) `rustc_ast_pretty` does is break with newlines sometimes.
    
    Fixes rust-lang/measureme#207
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    5227b68 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#111945 - GuillaumeGomez:migrate-gui-test-co…

    …lor-7, r=notriddle
    
    Migrate GUI colors test to original CSS color format
    
    Follow-up of rust-lang#111459.
    
    r? ``@notriddle``
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    cb5b402 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#111950 - cjgillot:expn-noinline, r=oli-obk

    Remove ExpnKind::Inlined.
    
    Suggested in rust-lang#111815 (comment)
    
    r? ``@oli-obk``
    compiler-errors authored May 25, 2023
    Configuration menu
    Copy the full SHA
    c2e3521 View commit details
    Browse the repository at this point in the history