-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Can create &mut
with only &
in statics
#18939
Comments
What the !@#!@#!@ |
very weird, seems highly misleading... but ... also not a high priority to fix, since one cannot actually write through So, P-high, not 1.0. |
@pnkfelix True, but you can still get aliased |
This seems to be fixed in the current nightly. The updated code is static FOO: [usize; 2] = [0, 0];
static BAR: &'static mut [usize; 2] = & FOO;
fn main() {} It does not compile:
|
Thanks @nham ! |
Flip on typing config to be opt-in, better defaults
This compiles fine:
The text was updated successfully, but these errors were encountered: