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 mutable references in static mut #56916

Merged
merged 3 commits into from
Dec 24, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Dec 17, 2018

fixes #56903

@oli-obk oli-obk added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 17, 2018
@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 18, 2018

r? @davidtwco as per github reviewer suggestions (idk why no reviewer was assigned)

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 18, 2018

📌 Commit 7e2e489 has been approved by davidtwco

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 18, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 20, 2018
… r=davidtwco

Fix a recently introduced regression

fixes rust-lang#56903
@pnkfelix pnkfelix added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 20, 2018
@pnkfelix
Copy link
Member

discussed at T-compiler meeting. beta-accepting.

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Dec 20, 2018
@pietroalbini
Copy link
Member

@bors r-
Failing in the rollup.

[01:04:26] ---- [ui] ui/consts/static_mut_containing_mut_ref2.rs stdout ----
[01:04:26] diff of stderr:
[01:04:26] 
[01:04:26] 4 LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
[01:04:26] 5    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^ statics require immutable values
[01:04:26] - error: aborting due to previous error
[01:04:26] - error: aborting due to previous error
[01:04:26] + error[E0019]: static contains unimplemented expression type
[01:04:26] +   --> $DIR/static_mut_containing_mut_ref2.rs:5:45
[01:04:26] +    |
[01:04:26] + LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
[01:04:26] 8 
[01:04:26] - For more information about this error, try `rustc --explain E0017`.
[01:04:26] + error: aborting due to 2 previous errors
[01:04:26] + 
[01:04:26] + 
[01:04:26] + Some errors occurred: E0017, E0019.
[01:04:26] + For more information about an error, try `rustc --explain E0017`.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 20, 2018
@oli-obk oli-obk changed the title Fix a recently introduced regression Fix mutable references in static mut Dec 21, 2018
@oli-obk oli-obk force-pushed the static_mut_beta_regression branch from 7e2e489 to 6ed596e Compare December 21, 2018 12:42
@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 21, 2018

@bors r=davidtwco

@bors
Copy link
Contributor

bors commented Dec 21, 2018

📌 Commit 6ed596e has been approved by davidtwco

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 21, 2018
Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2018
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903
Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903
bors added a commit that referenced this pull request Dec 23, 2018
Rollup of 10 pull requests

Successful merges:

 - #56188 (enum type instead of variant suggestion unification )
 - #56916 (Fix mutable references in `static mut`)
 - #56917 (Simplify MIR generation for logical operations)
 - #56953 (Mark tuple structs as live if their constructors are used)
 - #56964 (Remove `TokenStream::JointTree`.)
 - #56966 (Correct strings for raw pointer deref and array access suggestions)
 - #56999 (AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-end)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903
Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903
bors added a commit that referenced this pull request Dec 24, 2018
Rollup of 14 pull requests

Successful merges:

 - #56188 (enum type instead of variant suggestion unification )
 - #56342 (Improve docs for collecting into `Option`s)
 - #56916 (Fix mutable references in `static mut`)
 - #56917 (Simplify MIR generation for logical operations)
 - #56939 (Pin stabilization)
 - #56953 (Mark tuple structs as live if their constructors are used)
 - #56964 (Remove `TokenStream::JointTree`.)
 - #56966 (Correct strings for raw pointer deref and array access suggestions)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)
 - #57062 (Fix a comment)
 - #57067 (Stabilize min_const_unsafe_fn in 1.33)
 - #57078 (Ignore two tests on s390x)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Dec 24, 2018

⌛ Testing commit 6ed596e with merge 94bf2c1...

@bors bors merged commit 6ed596e into rust-lang:master Dec 24, 2018
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 31, 2018
bors added a commit that referenced this pull request Dec 31, 2018
[beta] Rollup backports

* #56919: Remove a wrong multiplier on relocation offset computation
* #56916: Fix mutable references in `static mut`
* #56863: fix trait objects with a Self-containing projection values
* #56850: Fixed issue with using `Self` ctor in typedefs

r? @ghost
bors added a commit that referenced this pull request Jan 1, 2019
[beta] Rollup backports

* #56919: Remove a wrong multiplier on relocation offset computation
* #56916: Fix mutable references in `static mut`
* #56863: fix trait objects with a Self-containing projection values
* #56850: Fixed issue with using `Self` ctor in typedefs

r? @ghost
@oli-obk oli-obk deleted the static_mut_beta_regression branch June 15, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

cannot mutate statics in initalizer of another static
5 participants