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 5 pull requests #120674

Closed
wants to merge 18 commits into from

Commits on Jan 27, 2024

  1. Configuration menu
    Copy the full SHA
    4272f1b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32e4862 View commit details
    Browse the repository at this point in the history
  3. update the tracking issue for structural match violations

    and bless a test I missed
    RalfJung committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    0808691 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2024

  1. Configuration menu
    Copy the full SHA
    efbfb04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c367983 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. limit the names_possiblilities to less than 3

    Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
    chenyukang and Urgau committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    0213c87 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ca243e7 View commit details
    Browse the repository at this point in the history
  3. tidy: wrap regexes with lazy_static

    yes, once_cell better, but ...
    
    this reduces from
    
    ==31349== Total:     1,365,199,543 bytes in 4,774,213 blocks
    ==31349== At t-gmax: 10,975,708 bytes in 66,093 blocks
    ==31349== At t-end:  2,880,947 bytes in 12,332 blocks
    ==31349== Reads:     5,210,008,956 bytes
    ==31349== Writes:    1,280,920,127 bytes
    
    to
    
    ==47796== Total:     821,467,407 bytes in 3,955,595 blocks
    ==47796== At t-gmax: 10,976,209 bytes in 66,100 blocks
    ==47796== At t-end:  2,944,016 bytes in 12,490 blocks
    ==47796== Reads:     4,788,959,023 bytes
    ==47796== Writes:    975,493,639 bytes
    
    miropt-test-tools: remove regex usage
    
    this removes regex usage and slightly refactors ext stripping in one case
    klensy committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c10a52e View commit details
    Browse the repository at this point in the history
  4. update ignore crate

     $ cargo update  -p ignore --precise=0.4.22
        Updating crates.io index
        Updating aho-corasick v1.0.2 -> v1.1.2
        Updating bstr v1.5.0 -> v1.9.0
        Updating globset v0.4.10 -> v0.4.14
        Updating ignore v0.4.20 -> v0.4.22
        Updating log v0.4.19 -> v0.4.20
        Updating memchr v2.5.0 -> v2.7.1
          Adding regex-automata v0.4.3
        Updating walkdir v2.3.3 -> v2.4.0
    
    some notable change is BurntSushi/ripgrep#2692
    
    reduces memory usage from
    
    ==47796== Total:     821,467,407 bytes in 3,955,595 blocks
    ==47796== At t-gmax: 10,976,209 bytes in 66,100 blocks
    ==47796== At t-end:  2,944,016 bytes in 12,490 blocks
    ==47796== Reads:     4,788,959,023 bytes
    ==47796== Writes:    975,493,639 bytes
    
    to
    
    ==66633== Total:     791,565,538 bytes in 3,503,144 blocks
    ==66633== At t-gmax: 10,914,511 bytes in 65,997 blocks
    ==66633== At t-end:  395,531 bytes in 941 blocks
    ==66633== Reads:     4,249,388,949 bytes
    ==66633== Writes:    814,119,580 bytes
    
    bump regex to dedupe one regex-syntax
    
    $ cargo update -p regex
        Updating crates.io index
        Updating regex v1.8.4 -> v1.10.2
        Removing regex-syntax v0.7.2
    klensy committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    a9ba383 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d34b0fa View commit details
    Browse the repository at this point in the history
  6. Account for unbounded type param receiver in suggestions

    When encountering
    
    ```rust
    fn f<T>(a: T, b: T) -> std::cmp::Ordering {
        a.cmp(&b) //~ ERROR E0599
    }
    ```
    
    output
    
    ```
    error[E0599]: no method named `cmp` found for type parameter `T` in the current scope
      --> $DIR/method-on-unbounded-type-param.rs:2:7
       |
    LL | fn f<T>(a: T, b: T) -> std::cmp::Ordering {
       |      - method `cmp` not found for this type parameter
    LL |     a.cmp(&b)
       |       ^^^ method cannot be called on `T` due to unsatisfied trait bounds
       |
       = help: items from traits can only be used if the type parameter is bounded by the trait
    help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
       |
    LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
       |       +++++
    LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
       |       ++++++++++
    ```
    
    Fix rust-lang#120186.
    estebank committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    20b1c2a View commit details
    Browse the repository at this point in the history
  7. fix rebase

    estebank committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9ccc770 View commit details
    Browse the repository at this point in the history
  8. Account for non-overlapping unmet trait bounds in suggestion

    When a method not found on a type parameter could have been provided by any
    of multiple traits, suggest each trait individually, instead of a single
    suggestion to restrict the type parameter with *all* of them.
    
    Before:
    
    ```
    error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
      --> $DIR/method-on-unbounded-type-param.rs:5:10
       |
    LL |     (&a).cmp(&b)
       |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
       |
       = note: the following trait bounds were not satisfied:
               `T: Ord`
               which is required by `&T: Ord`
               `&T: Iterator`
               which is required by `&mut &T: Iterator`
               `T: Iterator`
               which is required by `&mut T: Iterator`
    help: consider restricting the type parameters to satisfy the trait bounds
       |
    LL | fn g<T>(a: T, b: T) -> std::cmp::Ordering where T: Iterator, T: Ord {
       |                                           +++++++++++++++++++++++++
    ```
    
    After:
    
    ```
    error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
      --> $DIR/method-on-unbounded-type-param.rs:5:10
       |
    LL |     (&a).cmp(&b)
       |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
       |
       = note: the following trait bounds were not satisfied:
               `T: Ord`
               which is required by `&T: Ord`
               `&T: Iterator`
               which is required by `&mut &T: Iterator`
               `T: Iterator`
               which is required by `&mut T: Iterator`
       = help: items from traits can only be used if the type parameter is bounded by the trait
    help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
       |
    LL | fn g<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
       |       +++++
    LL | fn g<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
       |       ++++++++++
    ```
    
    Fix rust-lang#108428.
    estebank committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    5c41409 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Rollup merge of rust-lang#120023 - klensy:tidy-alloc, r=Mark-Simulacrum

    tidy: reduce allocs
    
    this reduces allocs in tidy from (dhat output)
    
    ```
    ==31349== Total:     1,365,199,543 bytes in 4,774,213 blocks
    ==31349== At t-gmax: 10,975,708 bytes in 66,093 blocks
    ==31349== At t-end:  2,880,947 bytes in 12,332 blocks
    ==31349== Reads:     5,210,008,956 bytes
    ==31349== Writes:    1,280,920,127 bytes
    ```
    to
    ```
    ==66633== Total:     791,565,538 bytes in 3,503,144 blocks
    ==66633== At t-gmax: 10,914,511 bytes in 65,997 blocks
    ==66633== At t-end:  395,531 bytes in 941 blocks
    ==66633== Reads:     4,249,388,949 bytes
    ==66633== Writes:    814,119,580 bytes
    ```
    
    by wrapping regex and updating `ignore` (effect probably not only from `ignore`, didn't measured)
    matthiaskrgr committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    3b20be5 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#120396 - estebank:method-on-unbounded-type-…

    …param, r=nnethercote
    
    Account for unbounded type param receiver in suggestions
    
    When encountering
    
    ```rust
    fn f<T>(a: T, b: T) -> std::cmp::Ordering {
        a.cmp(&b) //~ ERROR E0599
    }
    ```
    
    output
    
    ```
    error[E0599]: no method named `cmp` found for type parameter `T` in the current scope
      --> $DIR/method-on-unbounded-type-param.rs:2:7
       |
    LL | fn f<T>(a: T, b: T) -> std::cmp::Ordering {
       |      - method `cmp` not found for this type parameter
    LL |     a.cmp(&b)
       |       ^^^ method cannot be called on `T` due to unsatisfied trait bounds
       |
       = help: items from traits can only be used if the type parameter is bounded by the trait
    help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
       |
    LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
       |       +++++
    LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
       |       ++++++++++
    ```
    
    Fix rust-lang#120186.
    matthiaskrgr committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    1d3f05a View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#120423 - RalfJung:indirect-structural-match…

    …, r=petrochenkov
    
    update indirect structural match lints to match RFC and to show up for dependencies
    
    This is a large step towards implementing rust-lang/rfcs#3535.
    We currently have five lints related to "the structural match situation":
    - nontrivial_structural_match
    - indirect_structural_match
    - pointer_structural_match
    - const_patterns_without_partial_eq
    - illegal_floating_point_literal_pattern
    
    This PR concerns the first 3 of them. (The 4th already is set up to show for dependencies, and the 5th is removed by rust-lang#116284.) nontrivial_structural_match is being removed as per the RFC; the other two are enabled to show up in dependencies.
    
    Fixes rust-lang#73448 by removing the affected analysis.
    matthiaskrgr committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    5e80861 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#120435 - chenyukang:yukang-fix-120427-cfg-n…

    …ame, r=Urgau,Nilstrieb
    
    Suggest name value cfg when only value is used for check-cfg
    
    Fixes rust-lang#120427
    r? `````````@Nilstrieb`````````
    matthiaskrgr committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    74edcac View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#120507 - estebank:issue-108428, r=davidtwco

    Account for non-overlapping unmet trait bounds in suggestion
    
    When a method not found on a type parameter could have been provided by any
    of multiple traits, suggest each trait individually, instead of a single
    suggestion to restrict the type parameter with *all* of them.
    
    Before:
    
    ```
    error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
      --> $DIR/method-on-unbounded-type-param.rs:5:10
       |
    LL |     (&a).cmp(&b)
       |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
       |
       = note: the following trait bounds were not satisfied:
               `T: Ord`
               which is required by `&T: Ord`
               `&T: Iterator`
               which is required by `&mut &T: Iterator`
               `T: Iterator`
               which is required by `&mut T: Iterator`
    help: consider restricting the type parameters to satisfy the trait bounds
       |
    LL | fn g<T>(a: T, b: T) -> std::cmp::Ordering where T: Iterator, T: Ord {
       |                                           +++++++++++++++++++++++++
    ```
    
    After:
    
    ```
    error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
      --> $DIR/method-on-unbounded-type-param.rs:5:10
       |
    LL |     (&a).cmp(&b)
       |          ^^^ method cannot be called on `&T` due to unsatisfied trait bounds
       |
       = note: the following trait bounds were not satisfied:
               `T: Ord`
               which is required by `&T: Ord`
               `&T: Iterator`
               which is required by `&mut &T: Iterator`
               `T: Iterator`
               which is required by `&mut T: Iterator`
       = help: items from traits can only be used if the type parameter is bounded by the trait
    help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
       |
    LL | fn g<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
       |       +++++
    LL | fn g<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
       |       ++++++++++
    ```
    
    Fix rust-lang#108428.
    
    Follow up to rust-lang#120396, only last commit is relevant.
    matthiaskrgr committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    b868b6a View commit details
    Browse the repository at this point in the history