Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 50d406b

Browse files
committedMay 5, 2015
test: update run-pass tests to not use mutable transmuting
1 parent 8963872 commit 50d406b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/test/auxiliary/issue_8401.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ fn bar<T>(_: &mut A, _: &T) {}
2222

2323
fn foo<T>(t: &T) {
2424
let b = B;
25-
bar(unsafe { mem::transmute(&b as &A) }, t)
25+
bar(&mut b as &mut A, t)
2626
}

‎src/test/run-pass/issue-2718.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub mod pipes {
199199
unsafe {
200200
if self.p != None {
201201
let self_p: &mut Option<*const packet<T>> =
202-
mem::transmute(&self.p);
202+
mem::transmute(&mut self.p);
203203
let p = replace(self_p, None);
204204
receiver_terminate(p.unwrap())
205205
}

0 commit comments

Comments
 (0)
Please sign in to comment.