Skip to content

Commit e39db5a

Browse files
nikomatsakisbrson
authored andcommitted
all tests pass
1 parent db16fce commit e39db5a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/bench/shootout-nbody.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ mod NBodySystem {
7070
while i < 5 { move(bodies[i], dt); i += 1; }
7171
}
7272

73-
fn advance_one(bi: Body::props, bj: Body::props, dt: float) {
73+
fn advance_one(bi: Body::props, bj: Body::props, dt: float) unsafe {
7474
let dx: float = bi.x - bj.x;
7575
let dy: float = bi.y - bj.y;
7676
let dz: float = bi.z - bj.z;
@@ -95,7 +95,7 @@ mod NBodySystem {
9595
b.z += dt * b.vz;
9696
}
9797

98-
fn energy(bodies: [Body::props]) -> float {
98+
fn energy(bodies: [Body::props]) -> float unsafe {
9999
let dx: float;
100100
let dy: float;
101101
let dz: float;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// error-pattern:expected *Mb but found native
22
use std;
33

4-
fn main() {
4+
fn main() unsafe {
55
let f: std::os::libc::FILE = std::io::rustrt::rust_get_stdin();
66
std::os::libc::fopen(f, f);
77
}

0 commit comments

Comments
 (0)