(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 {
}
}
-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!();
}
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,
}
};
let sessopts = build_session_options(
- @"rustc",
+ ~"rustc",
matches,
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
let sess = build_session(sessopts,
// 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,
target_cpu: ~"generic",
target_feature: ~"",
cfg: ~[],
- binary: @"rustc",
+ binary: ~"rustc",
test: false,
parse_only: false,
no_trans: false,
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; }
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],
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],
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],
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());
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);
// 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(" "));