diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index b0fa22f8172..7d5846ebd6a 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -686,7 +686,7 @@ pub fn host_triple() -> ~str { (env!("CFG_COMPILER")).to_owned() } -pub fn build_session_options(binary: @str, +pub fn build_session_options(binary: ~str, matches: &getopts::Matches, demitter: @diagnostic::Emitter) -> @session::options { @@ -1105,7 +1105,7 @@ pub fn build_output_filenames(input: &input, } } -pub fn early_error(emitter: @diagnostic::Emitter, msg: &str) -> ! { +pub fn early_error(emitter: &diagnostic::Emitter, msg: &str) -> ! { emitter.emit(None, msg, diagnostic::fatal); fail!(); } @@ -1135,7 +1135,7 @@ mod test { Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg()) }; let sessopts = build_session_options( - @"rustc", + ~"rustc", matches, @diagnostic::DefaultEmitter as @diagnostic::Emitter); let sess = build_session(sessopts, @@ -1158,7 +1158,7 @@ mod test { } }; let sessopts = build_session_options( - @"rustc", + ~"rustc", matches, @diagnostic::DefaultEmitter as @diagnostic::Emitter); let sess = build_session(sessopts, diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs index 63ccc91cd55..55822b66ae4 100644 --- a/src/librustc/driver/session.rs +++ b/src/librustc/driver/session.rs @@ -163,7 +163,7 @@ pub struct options { // will be added to the crate AST node. This should not be used for // anything except building the full crate config prior to parsing. cfg: ast::CrateConfig, - binary: @str, + binary: ~str, test: bool, parse_only: bool, no_trans: bool, @@ -395,7 +395,7 @@ pub fn basic_options() -> @options { target_cpu: ~"generic", target_feature: ~"", cfg: ~[], - binary: @"rustc", + binary: ~"rustc", test: false, parse_only: false, no_trans: false, diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index a5ec422699d..5ce25513399 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -197,7 +197,7 @@ pub fn describe_debug_flags() { pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) { let mut args = args.to_owned(); - let binary = args.shift().to_managed(); + let binary = args.shift(); if args.is_empty() { usage(binary); return; } diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 18891d38d38..63b92394365 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -49,7 +49,7 @@ fn get_ast_and_resolve(cpath: &Path, let input = file_input(cpath.clone()); let sessopts = @driver::session::options { - binary: @"rustdoc", + binary: ~"rustdoc", maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()), addl_lib_search_paths: @RefCell::new(libs), outputs: ~[driver::session::OutputDylib], diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index b21b1db955f..480ace2e419 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -38,7 +38,7 @@ pub fn run(input: &str, matches: &getopts::Matches) -> int { let libs = @RefCell::new(libs.move_iter().collect()); let sessopts = @session::options { - binary: @"rustdoc", + binary: ~"rustdoc", maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()), addl_lib_search_paths: libs, outputs: ~[session::OutputDylib], @@ -98,7 +98,7 @@ fn runtest(test: &str, cratename: &str, libs: HashSet) { let input = driver::str_input(test); let sessopts = @session::options { - binary: @"rustdoctest", + binary: ~"rustdoctest", maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()), addl_lib_search_paths: @RefCell::new(libs), outputs: ~[session::OutputExecutable], diff --git a/src/librustpkg/lib.rs b/src/librustpkg/lib.rs index 2b54a6d6f1c..ae58495fa8a 100644 --- a/src/librustpkg/lib.rs +++ b/src/librustpkg/lib.rs @@ -101,7 +101,7 @@ impl<'a> PkgScript<'a> { workspace: &Path, id: &'a CrateId) -> PkgScript<'a> { // Get the executable name that was invoked - let binary = os::args()[0].to_managed(); + let binary = os::args()[0].to_owned(); // Build the rustc session data structures to pass // to the compiler debug!("pkgscript parse: {}", sysroot.display()); diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index 7f6342dba5c..2ceed4f3df7 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -1823,7 +1823,7 @@ fn test_linker_build() { let workspace = create_local_package(&p_id); let workspace = workspace.path(); let matches = getopts([], optgroups()); - let options = build_session_options(@"rustpkg", + let options = build_session_options(~"rustpkg", matches.as_ref().unwrap(), @diagnostic::DefaultEmitter as @diagnostic::Emitter); diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index af940e34789..87657f729f9 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -189,7 +189,7 @@ pub fn compile_input(context: &BuildContext, // Make the output directory if it doesn't exist already fs::mkdir_recursive(&out_dir, io::UserRWX); - let binary = os::args()[0].to_managed(); + let binary = os::args()[0].to_owned(); debug!("flags: {}", flags.connect(" ")); debug!("cfgs: {}", cfgs.connect(" "));