Skip to content

Commit 50d406b

Browse files
committed
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

+1-1
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

+1-1
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)