Skip to content

Commit

Permalink
Update tests to changes on master
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk authored and pietroalbini committed Dec 31, 2018
1 parent f6f28d8 commit e5126cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/test/ui/consts/static_mut_containing_mut_ref2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ static mut STDERR_BUFFER_SPACE: u8 = 0;

pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
//~^ ERROR references in statics may only refer to immutable values
//~| ERROR static contains unimplemented expression type

fn main() {}
11 changes: 9 additions & 2 deletions src/test/ui/consts/static_mut_containing_mut_ref2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ error[E0017]: references in statics may only refer to immutable values
LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ statics require immutable values

error: aborting due to previous error
error[E0019]: static contains unimplemented expression type
--> $DIR/static_mut_containing_mut_ref2.rs:5:45
|
LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0017`.
Some errors occurred: E0017, E0019.
For more information about an error, try `rustc --explain E0017`.

0 comments on commit e5126cf

Please sign in to comment.