Skip to content

Commit

Permalink
Output modified function to stdout. Modified build.sh to copy stdout …
Browse files Browse the repository at this point in the history
…into playground so that a clean compile can be achieved. In response to this bug in the nightly compiler: rust-lang/rust#46489
  • Loading branch information
MichaelOultram committed Mar 5, 2018
1 parent 1a11756 commit 29186cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 26 deletions.
11 changes: 10 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/usr/bin/bash
playground=~/Projects/FYP/src/playground/
echo "Removing .autoparallelise"
rm .autoparallelise
echo "Running Stage 1"
cargo build
for i in {1..5}
do (>&2 echo "=================================================================")
done
cargo build
echo "Running Stage 2"
cargo build >${playground}/src/main.rs
for i in {1..5}
do (>&2 echo "=================================================================")
done
echo "Compiling Playground"
(cd ${playground} && cargo build)
2 changes: 1 addition & 1 deletion src/auto_parallelise/src/syntax_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl MultiItemModifier for AutoParallelise {
let (seqident, seqfunction) = reconstructor::create_function(cx, item, &func_name, false, seqblock);

// Prints the function
eprintln!("converted_function:\n{}\n{}", pprust::item_to_string(&parfunction), pprust::item_to_string(&seqfunction));
println!("{}\n{}\n", pprust::item_to_string(&parfunction), pprust::item_to_string(&seqfunction));

output.push(Annotatable::Item(P(parfunction)));
output.push(Annotatable::Item(P(seqfunction)));
Expand Down
1 change: 1 addition & 0 deletions src/playground/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/main.rs
24 changes: 0 additions & 24 deletions src/playground/src/main.rs

This file was deleted.

0 comments on commit 29186cc

Please sign in to comment.