Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/71212.rs: fixed with errors #369

Merged
merged 1 commit into from
May 17, 2020
Merged

ices/71212.rs: fixed with errors #369

merged 1 commit into from
May 17, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#71212

#![feature(const_mut_refs)]

const FOO: &mut i32 = &mut 4;

fn main() {
    *FOO = 2;
}
=== stdout ===
=== stderr ===
error: mutable memory (`&mut`) is not allowed in constant
 --> /home/runner/work/glacier/glacier/ices/71212.rs:3:1
  |
3 | const FOO: &mut i32 = &mut 4;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: mutable memory (`&mut`) is not allowed in constant
 --> /home/runner/work/glacier/glacier/ices/71212.rs:3:1
  |
3 | const FOO: &mut i32 = &mut 4;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is as well.

@JohnTitor JohnTitor merged commit 15cd029 into master May 17, 2020
@JohnTitor JohnTitor deleted the autofix/ices/71212.rs branch May 17, 2020 12:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants