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

Projects
None yet
5 participants
@oli-obk
Copy link
Contributor

oli-obk commented Dec 17, 2018

fixes #56903

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Dec 18, 2018

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

@davidtwco

This comment has been minimized.

Copy link
Member

davidtwco commented Dec 18, 2018

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 18, 2018

📌 Commit 7e2e489 has been approved by davidtwco

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 20, 2018

Rollup merge of rust-lang#56916 - oli-obk:static_mut_beta_regression,…
… r=davidtwco

Fix a recently introduced regression

fixes rust-lang#56903

bors added a commit that referenced this pull request Dec 20, 2018

Auto merge of #57005 - pietroalbini:rollup, r=pietroalbini
Rollup of 19 pull requests

Successful merges:

 - #56842 (Add unstable VecDeque::rotate_{left|right})
 - #56843 (Add a note describing the type of the non-Copy moved variable)
 - #56845 (Don't render const keyword on stable)
 - #56862 (stop treating trait objects from #[fundamental] traits as fundamental)
 - #56869 (Reduce search-index.js size)
 - #56887 (Disable field reordering for repr(int).)
 - #56892 (rustc: Update Clang used to build LLVM on Linux)
 - #56906 (Issue #56905)
 - #56909 (static eval: Do not ICE on layout size overflow)
 - #56914 (Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le)
 - #56916 (Fix a recently introduced regression)
 - #56919 (Remove a wrong multiplier on relocation offset computation)
 - #56933 (Add --progress to git submodule commands in x.py)
 - #56954 (Add dist builder for Armv8-M Mainline)
 - #56970 (Mem uninit doc ptr drop)
 - #56973 (make basic CTFE tracing available on release builds)
 - #56979 (Adding unwinding support for x86_64_fortanix_unknown_sgx target.)
 - #56984 (A few tweaks to dropck_outlives)
 - #56989 (Fix compiletest `trim` deprecation warnings)

Failed merges:

r? @ghost

@pnkfelix pnkfelix added the T-compiler label Dec 20, 2018

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Dec 20, 2018

discussed at T-compiler meeting. beta-accepting.

@pietroalbini

This comment has been minimized.

Copy link
Member

pietroalbini commented Dec 20, 2018

@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`.

@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 oli-obk:static_mut_beta_regression branch from 7e2e489 to 6ed596e Dec 21, 2018

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Dec 21, 2018

@bors r=davidtwco

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 21, 2018

📌 Commit 6ed596e has been approved by davidtwco

Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2018

Rollup merge of rust-lang#56916 - oli-obk:static_mut_beta_regression,…
… 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

Rollup merge of rust-lang#56916 - oli-obk:static_mut_beta_regression,…
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903

bors added a commit that referenced this pull request Dec 23, 2018

Auto merge of #57075 - Centril:rollup, r=Centril
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

Rollup merge of rust-lang#56916 - oli-obk:static_mut_beta_regression,…
… 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

Rollup merge of rust-lang#56916 - oli-obk:static_mut_beta_regression,…
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903

bors added a commit that referenced this pull request Dec 23, 2018

Auto merge of #57083 - Centril:rollup, r=Centril
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)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)
 - #57067 (Stabilize min_const_unsafe_fn in 1.33)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request Dec 23, 2018

Auto merge of #57083 - Centril:rollup, r=Centril
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)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)
 - #57067 (Stabilize min_const_unsafe_fn in 1.33)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018

Rollup merge of rust-lang#56916 - oli-obk:static_mut_beta_regression,…
… r=davidtwco

Fix mutable references in `static mut`

fixes rust-lang#56903

bors added a commit that referenced this pull request Dec 24, 2018

Auto merge of #57087 - Centril:rollup, r=Centril
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 added a commit that referenced this pull request Dec 24, 2018

Auto merge of #57087 - Centril:rollup, r=Centril
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

This comment has been minimized.

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

1 of 2 checks passed

homu Testing commit 6ed596ebe245df1a8de8a609222c8e217508f6dd with merge 94bf2c15eb3d072e92855a605783a29920df9e46...
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

bors added a commit that referenced this pull request Dec 31, 2018

Auto merge of #57236 - pietroalbini:beta-backports, r=pietroalbini
[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

Auto merge of #57236 - pietroalbini:beta-backports, r=pietroalbini
[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment