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

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

onur-ozkan and others added 7 commits February 29, 2024 13:53
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>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
…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.
… 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
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 17, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=3

@bors
Copy link
Contributor

bors commented Mar 17, 2024

📌 Commit 1213746 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2024
@bors
Copy link
Contributor

bors commented Mar 17, 2024

⌛ Testing commit 1213746 with merge 35dfc67...

@bors
Copy link
Contributor

bors commented Mar 17, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 35dfc67 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2024
@bors bors merged commit 35dfc67 into rust-lang:master Mar 17, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 17, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#121236 Don't show suggestion if slice pattern is not top-level ba4ff854fce8f62f97aff281468299e3c4428a03 (link)
#121787 run change tracker even when config parse fails 5b51f204efa8a5dd8c0bcd7ae6aeb87465ab4ccc (link)
#122633 avoid unnecessary collect() 291f6425a4fd08fed7ab811a2412c56e86ffe4b9 (link)

previous master: a0c20d52e0

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@bors bors mentioned this pull request Mar 17, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Starting download for Cargo-lock
Directory structure has been setup for the artifact
Total number of files that will be downloaded: 1
Artifact Cargo-lock was downloaded to /home/runner/work/rust/rust
##[group]Run actions/download-artifact@v3
with:
  name: cargo-updates
---
##[endgroup]
Starting download for cargo-updates
Directory structure has been setup for the artifact
Total number of files that will be downloaded: 1
Skipping download validation.
Artifact cargo-updates was downloaded to /home/runner/work/rust/rust
##[group]Run echo "${COMMIT_MESSAGE}" > commit.txt
echo "${COMMIT_MESSAGE}" > commit.txt
echo "${COMMIT_MESSAGE}" > commit.txt
cat cargo_update.log >> commit.txt

echo "${PR_MESSAGE}" > body.md
echo '```txt' >> body.md
cat cargo_update.log >> body.md
echo '```' >> body.md
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  RUSTC_BOOTSTRAP: 1
  PR_TITLE: Weekly `cargo update`
  PR_MESSAGE: Automation to keep dependencies in `Cargo.lock` current.
following is the output from `cargo update`:
  COMMIT_MESSAGE: cargo update 
##[endgroup]
##[group]Run git config user.name github-actions
git config user.name github-actions
git config user.email github-actions@github.com
git switch --force-create cargo_update
git add ./Cargo.lock
git commit --no-verify --file=commit.txt
---
##[endgroup]
Switched to a new branch 'cargo_update'
On branch cargo_update
Untracked files:
  (use "git add <file>..." to include in what will be committed)
 body.md
 commit.txt


nothing added to commit but untracked files present (use "git add" to track)
##[error]Process completed with exit code 1.

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Starting download for Cargo-lock
Directory structure has been setup for the artifact
Total number of files that will be downloaded: 1
Artifact Cargo-lock was downloaded to /home/runner/work/rust/rust
##[group]Run actions/download-artifact@v3
with:
  name: cargo-updates
---
##[endgroup]
Starting download for cargo-updates
Directory structure has been setup for the artifact
Total number of files that will be downloaded: 1
Skipping download validation.
Artifact cargo-updates was downloaded to /home/runner/work/rust/rust
##[group]Run echo "${COMMIT_MESSAGE}" > commit.txt
echo "${COMMIT_MESSAGE}" > commit.txt
echo "${COMMIT_MESSAGE}" > commit.txt
cat cargo_update.log >> commit.txt

echo "${PR_MESSAGE}" > body.md
echo '```txt' >> body.md
cat cargo_update.log >> body.md
echo '```' >> body.md
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  RUSTC_BOOTSTRAP: 1
  PR_TITLE: Weekly `cargo update`
  PR_MESSAGE: Automation to keep dependencies in `Cargo.lock` current.
following is the output from `cargo update`:
  COMMIT_MESSAGE: cargo update 
##[endgroup]
##[group]Run git config user.name github-actions
git config user.name github-actions
git config user.email github-actions@github.com
git switch --force-create cargo_update
git add ./Cargo.lock
git commit --no-verify --file=commit.txt
---
##[endgroup]
Switched to a new branch 'cargo_update'
On branch cargo_update
Untracked files:
  (use "git add <file>..." to include in what will be committed)
 body.md
 commit.txt


nothing added to commit but untracked files present (use "git add" to track)
##[error]Process completed with exit code 1.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (35dfc67): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.4%, -2.5%] 2
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-3.5%, -0.9%] 6
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 668.793s -> 668.447s (-0.05%)
Artifact size: 312.78 MiB -> 312.75 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants