Skip to content

Commit

Permalink
fix test output
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jan 1, 2019
1 parent e6c5332 commit 1cf854f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/test/ui/consts/static_mut_containing_mut_ref2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ 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: 2 additions & 9 deletions src/test/ui/consts/static_mut_containing_mut_ref2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ 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[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
error: aborting due to previous error

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

0 comments on commit 1cf854f

Please sign in to comment.