Skip to content

Commit

Permalink
Remove unnecessary allocation, update API name for starting the rustc…
Browse files Browse the repository at this point in the history
… driver.
  • Loading branch information
bjadamson committed Sep 30, 2014
1 parent 823f108 commit d96faf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/librustc/driver/mod.rs
Expand Up @@ -29,16 +29,13 @@ use syntax::diagnostics;

use getopts;


pub mod driver;
pub mod session;
pub mod config;
pub mod pretty;


pub fn main_args(args: &[String]) -> int {
let owned_args = args.to_vec();
monitor(proc() run_compiler(owned_args.as_slice()));
pub fn run(args: Vec<String>) -> int {
monitor(proc() run_compiler(args.as_slice()));
0
}

Expand Down
3 changes: 2 additions & 1 deletion src/librustc/lib.rs
Expand Up @@ -149,5 +149,6 @@ mod rustc {

pub fn main() {
let args = std::os::args();
std::os::set_exit_status(driver::main_args(args.as_slice()));
let result = driver::run(args);
std::os::set_exit_status(result);
}

9 comments on commit d96faf7

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at bjadamson@d96faf7

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging bjadamson/rust/rustc-improvements = d96faf7 into auto

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bjadamson/rust/rustc-improvements = d96faf7 merged ok, testing candidate = 1a4cc613

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at bjadamson@d96faf7

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging bjadamson/rust/rustc-improvements = d96faf7 into auto

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bjadamson/rust/rustc-improvements = d96faf7 merged ok, testing candidate = b2d4eb1

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on d96faf7 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = b2d4eb1

Please sign in to comment.