-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77e6c56
commit c1494d6
Showing
4 changed files
with
17 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#![feature(raw_ref_op)] | ||
|
||
const A: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed | ||
const A: () = { let mut x = 2; &raw mut x; }; //~ mutable reference | ||
|
||
static B: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed | ||
static B: () = { let mut x = 2; &raw mut x; }; //~ mutable reference | ||
|
||
static mut C: () = { let mut x = 2; &raw mut x; }; //~ ERROR `&raw mut` is not allowed | ||
static mut C: () = { let mut x = 2; &raw mut x; }; //~ mutable reference | ||
|
||
const fn foo() { | ||
let mut x = 0; | ||
let y = &raw mut x; //~ ERROR `&raw mut` is not allowed | ||
let y = &raw mut x; //~ mutable reference | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters