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

Fix static_mut_ref warning. #13329

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Fix static_mut_ref warning. #13329

merged 1 commit into from
Jan 20, 2024

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jan 19, 2024

The nightly compiler has recently added the static_mut_ref lint, which warns about taking a reference to a mut static. This fixes the issue by copying the value instead of taking a reference. I don't recall what I was thinking when I wrote this, but it was probably a bad reflex against making copies.

@rustbot
Copy link
Collaborator

rustbot commented Jan 19, 2024

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 19, 2024
@weihanglo
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Jan 19, 2024

📌 Commit 3c414b5 has been approved by weihanglo

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 Jan 19, 2024
@bors
Copy link
Collaborator

bors commented Jan 19, 2024

⌛ Testing commit 3c414b5 with merge 0702139...

@bors
Copy link
Collaborator

bors commented Jan 20, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 0702139 to master...

@bors bors merged commit 0702139 into rust-lang:master Jan 20, 2024
17 of 18 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2024
Update cargo

10 commits in 1ae631085f01c1a72d05df1ec81f3759a8360042..7bb7b539558dc88bea44cee4168b6269bf8177b0
2024-01-17 17:26:41 +0000 to 2024-01-20 00:15:32 +0000
- feat: inherit jobserver from env for all kinds of runner (rust-lang/cargo#12776)
- Fix static_mut_ref warning. (rust-lang/cargo#13329)
- fix(trim-paths): remap common prefix only (rust-lang/cargo#13210)
- fix(cargo-rustdoc): use same path by output format logic everywhere (rust-lang/cargo#13325)
- chore: Make MSRV=N-2 the workspace default (rust-lang/cargo#13324)
- Fix precise-prerelease tracking link. (rust-lang/cargo#13320)
- test(pkgid): keep package ID format in sync (rust-lang/cargo#13322)
- Improve GitHub Actions CI config (rust-lang/cargo#13317)
- Go back to passing an empty `values()` when no features are declared (rust-lang/cargo#13316)
- fix(`--package`): accept `?` if it's a valid pkgid spec (rust-lang/cargo#13315)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2024
Update cargo

10 commits in 1ae631085f01c1a72d05df1ec81f3759a8360042..7bb7b539558dc88bea44cee4168b6269bf8177b0
2024-01-17 17:26:41 +0000 to 2024-01-20 00:15:32 +0000
- feat: inherit jobserver from env for all kinds of runner (rust-lang/cargo#12776)
- Fix static_mut_ref warning. (rust-lang/cargo#13329)
- fix(trim-paths): remap common prefix only (rust-lang/cargo#13210)
- fix(cargo-rustdoc): use same path by output format logic everywhere (rust-lang/cargo#13325)
- chore: Make MSRV=N-2 the workspace default (rust-lang/cargo#13324)
- Fix precise-prerelease tracking link. (rust-lang/cargo#13320)
- test(pkgid): keep package ID format in sync (rust-lang/cargo#13322)
- Improve GitHub Actions CI config (rust-lang/cargo#13317)
- Go back to passing an empty `values()` when no features are declared (rust-lang/cargo#13316)
- fix(`--package`): accept `?` if it's a valid pkgid spec (rust-lang/cargo#13315)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2024
Update cargo

10 commits in 1ae631085f01c1a72d05df1ec81f3759a8360042..7bb7b539558dc88bea44cee4168b6269bf8177b0
2024-01-17 17:26:41 +0000 to 2024-01-20 00:15:32 +0000
- feat: inherit jobserver from env for all kinds of runner (rust-lang/cargo#12776)
- Fix static_mut_ref warning. (rust-lang/cargo#13329)
- fix(trim-paths): remap common prefix only (rust-lang/cargo#13210)
- fix(cargo-rustdoc): use same path by output format logic everywhere (rust-lang/cargo#13325)
- chore: Make MSRV=N-2 the workspace default (rust-lang/cargo#13324)
- Fix precise-prerelease tracking link. (rust-lang/cargo#13320)
- test(pkgid): keep package ID format in sync (rust-lang/cargo#13322)
- Improve GitHub Actions CI config (rust-lang/cargo#13317)
- Go back to passing an empty `values()` when no features are declared (rust-lang/cargo#13316)
- fix(`--package`): accept `?` if it's a valid pkgid spec (rust-lang/cargo#13315)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2024
Update cargo

10 commits in 1ae631085f01c1a72d05df1ec81f3759a8360042..7bb7b539558dc88bea44cee4168b6269bf8177b0
2024-01-17 17:26:41 +0000 to 2024-01-20 00:15:32 +0000
- feat: inherit jobserver from env for all kinds of runner (rust-lang/cargo#12776)
- Fix static_mut_ref warning. (rust-lang/cargo#13329)
- fix(trim-paths): remap common prefix only (rust-lang/cargo#13210)
- fix(cargo-rustdoc): use same path by output format logic everywhere (rust-lang/cargo#13325)
- chore: Make MSRV=N-2 the workspace default (rust-lang/cargo#13324)
- Fix precise-prerelease tracking link. (rust-lang/cargo#13320)
- test(pkgid): keep package ID format in sync (rust-lang/cargo#13322)
- Improve GitHub Actions CI config (rust-lang/cargo#13317)
- Go back to passing an empty `values()` when no features are declared (rust-lang/cargo#13316)
- fix(`--package`): accept `?` if it's a valid pkgid spec (rust-lang/cargo#13315)

r? ghost
@rustbot rustbot added this to the 1.77.0 milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants