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 3 pull requests #122637

Merged
merged 7 commits into from Mar 17, 2024
Merged

Rollup of 3 pull requests #122637

merged 7 commits into from Mar 17, 2024

Commits on Feb 29, 2024

  1. run change tracker even when config parse fails

    Please note that we are currently validating the build configuration
    on two entry points (e.g., profile validation is handled on the python side),
    and change-tracker system is handled on the rust side. Once rust-lang#94829 is
    completed (scheduled for 2024), we will be able to handle this more effectively.
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    83bbb55 View commit details
    Browse the repository at this point in the history
  2. add unit tests on unknown fields

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    c36f493 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2024

  1. Configuration menu
    Copy the full SHA
    78e94cb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8db431 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#121236 - long-long-float:rust-fix-consider-…

    …slicing, r=Nadrieril
    
    Don't show suggestion if slice pattern is not top-level
    
    Close rust-lang#120605
    
    Don't show suggestion to add slicing (`[..]`) if the slice pattern is enclosed by struct like `Struct { a: [] }`.
    
    For example, current rustc makes a suggestion as a comment. However, the pattern `a: []` is wrong, not scrutinee `&self.a`.
    In this case, the structure type `a: Vec<Struct>` and the pattern `a: []` are different so I think the pattern should be fixed, not the scrutinee.
    If the parent of the pattern that was the target of the error is a structure, I made the compiler not show a suggestion.
    
    ```rs
    pub struct Struct {
        a: Vec<Struct>,
    }
    
    impl Struct {
        pub fn test(&self) {
            if let [Struct { a: [] }] = &self.a {
    //             ^^^^^^^^^^^^^^^^^^   ------- help: consider slicing here: `&self.a[..]`
                println!("matches!")
            }
        }
    }
    ```
    
    Note:
    
    * ~~I created `PatInfo.history` to store parent-child relationships for patterns, but this may be inefficient.~~
      * I use two fields `parent_kind` and `current_kind` instead of vec. It may not performance issue.
    * Currently only looking at direct parents, but may need to look at deeper ancestry.
    matthiaskrgr committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    3ec2b7b View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#121787 - onur-ozkan:improve-change-tracker,…

    … r=albertlarsan68
    
    run change tracker even when config parse fails
    
    Please note that we are currently validating the build configuration on two entry points (e.g., profile validation is handled on the python side), and change tracker system is handled on the rust side. Once rust-lang#94829 is completed (scheduled for 2024), we will be able to handle this more effectively.
    
    Fixes rust-lang#121756
    matthiaskrgr committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    2448162 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#122633 - matthiaskrgr:col, r=fmease

    avoid unnecessary collect()
    matthiaskrgr committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    1213746 View commit details
    Browse the repository at this point in the history