Skip to content

Someone probably already got to this, but if not, this should fix incoming from last night. #5381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc/middle/astencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,8 @@ impl fake_ext_ctxt for fake_session {
}

#[cfg(test)]
fn mk_ctxt() -> fake_ext_ctxt {
@parse::new_parse_sess(None) as fake_ext_ctxt
fn mk_ctxt() -> @fake_ext_ctxt {
@parse::new_parse_sess(None) as @fake_ext_ctxt
}

#[cfg(test)]
Expand Down
1 change: 1 addition & 0 deletions src/test/bench/core-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use std::oldmap;
use std::oldmap::{Map, HashMap};

use core::io::{Reader, ReaderUtil};
use core::rand::RngUtil;

macro_rules! bench (
($id:ident) => (maybe_run_test(argv, stringify!($id).to_owned(), $id))
Expand Down
3 changes: 2 additions & 1 deletion src/test/bench/graph500-bfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use std::deque::Deque;
use std::par;
use core::io::WriterUtil;
use core::int::abs;
use core::rand::RngUtil;

type node_id = i64;
type graph = ~[~[node_id]];
Expand All @@ -37,7 +38,7 @@ type bfs_result = ~[node_id];
fn make_edges(scale: uint, edgefactor: uint) -> ~[(node_id, node_id)] {
let r = rand::xorshift();

fn choose_edge(i: node_id, j: node_id, scale: uint, r: rand::Rng)
fn choose_edge(i: node_id, j: node_id, scale: uint, r: @rand::Rng)
-> (node_id, node_id) {

let A = 0.57;
Expand Down
4 changes: 3 additions & 1 deletion src/test/bench/noise.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Perlin noise benchmark from https://gist.github.com/1170424

use core::rand::RngUtil;

struct Vec2 {
x: f32,
y: f32,
Expand All @@ -8,7 +10,7 @@ struct Vec2 {
fn lerp(a: f32, b: f32, v: f32) -> f32 { a * (1.0 - v) + b * v }
fn smooth(v: f32) -> f32 { v * v * (3.0 - 2.0 * v) }

fn random_gradient(r: rand::Rng) -> Vec2 {
fn random_gradient(r: @rand::Rng) -> Vec2 {
let v = r.gen_float() * float::consts::pi * 2.0;
Vec2{
x: float::cos(v) as f32,
Expand Down
4 changes: 2 additions & 2 deletions src/test/bench/shootout-fasta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn select_random(r: u32, genelist: ~[AminoAcids]) -> char {
return bisect(copy genelist, 0, vec::len::<AminoAcids>(genelist) - 1, r);
}

fn make_random_fasta(wr: io::Writer, id: ~str, desc: ~str, genelist: ~[AminoAcids], n: int) {
fn make_random_fasta(wr: @io::Writer, id: ~str, desc: ~str, genelist: ~[AminoAcids], n: int) {
wr.write_line(~">" + id + ~" " + desc);
let rng = @mut MyRandom {last: rand::Rng().next()};
let mut op: ~str = ~"";
Expand All @@ -72,7 +72,7 @@ fn make_random_fasta(wr: io::Writer, id: ~str, desc: ~str, genelist: ~[AminoAcid
if str::len(op) > 0u { wr.write_line(op); }
}

fn make_repeat_fasta(wr: io::Writer, id: ~str, desc: ~str, s: ~str, n: int) {
fn make_repeat_fasta(wr: @io::Writer, id: ~str, desc: ~str, s: ~str, n: int) {
unsafe {
wr.write_line(~">" + id + ~" " + desc);
let mut op: ~str = ~"";
Expand Down
2 changes: 1 addition & 1 deletion src/test/bench/shootout-mandelbrot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl io::Writer for Devnull {

fn writer(path: ~str, pport: comm::Port<Line>, size: uint)
{
let cout: io::Writer = match path {
let cout: @io::Writer = match path {
~"" => {
@Devnull as @io::Writer
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/bench/sudoku.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type grid = ~[~[u8]];
pub enum grid_t { grid_ctor(grid), }

// read a sudoku problem from file f
pub fn read_grid(f: io::Reader) -> grid_t {
pub fn read_grid(f: @io::Reader) -> grid_t {
fail_unless!(f.read_line() == ~"9,9"); /* assert first line is exactly "9,9" */

let mut g = vec::from_fn(10u, {|_i|
Expand Down Expand Up @@ -127,7 +127,7 @@ pub fn solve_grid(g: grid_t) {
}
}

pub fn write_grid(f: io::Writer, g: grid_t) {
pub fn write_grid(f: @io::Writer, g: grid_t) {
for u8::range(0u8, 9u8) |row| {
f.write_str(fmt!("%u", (*g)[row][0] as uint));
for u8::range(1u8, 9u8) |col| {
Expand Down