rustc::driver: Remove two @s
This commit is contained in:
parent
e61937a6bf
commit
a52cdfdfce
8 changed files with 13 additions and 13 deletions
|
@ -686,7 +686,7 @@ pub fn host_triple() -> ~str {
|
||||||
(env!("CFG_COMPILER")).to_owned()
|
(env!("CFG_COMPILER")).to_owned()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_session_options(binary: @str,
|
pub fn build_session_options(binary: ~str,
|
||||||
matches: &getopts::Matches,
|
matches: &getopts::Matches,
|
||||||
demitter: @diagnostic::Emitter)
|
demitter: @diagnostic::Emitter)
|
||||||
-> @session::options {
|
-> @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);
|
emitter.emit(None, msg, diagnostic::fatal);
|
||||||
fail!();
|
fail!();
|
||||||
}
|
}
|
||||||
|
@ -1135,7 +1135,7 @@ mod test {
|
||||||
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
|
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
|
||||||
};
|
};
|
||||||
let sessopts = build_session_options(
|
let sessopts = build_session_options(
|
||||||
@"rustc",
|
~"rustc",
|
||||||
matches,
|
matches,
|
||||||
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
|
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
|
||||||
let sess = build_session(sessopts,
|
let sess = build_session(sessopts,
|
||||||
|
@ -1158,7 +1158,7 @@ mod test {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let sessopts = build_session_options(
|
let sessopts = build_session_options(
|
||||||
@"rustc",
|
~"rustc",
|
||||||
matches,
|
matches,
|
||||||
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
|
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
|
||||||
let sess = build_session(sessopts,
|
let sess = build_session(sessopts,
|
||||||
|
|
|
@ -163,7 +163,7 @@ pub struct options {
|
||||||
// will be added to the crate AST node. This should not be used for
|
// will be added to the crate AST node. This should not be used for
|
||||||
// anything except building the full crate config prior to parsing.
|
// anything except building the full crate config prior to parsing.
|
||||||
cfg: ast::CrateConfig,
|
cfg: ast::CrateConfig,
|
||||||
binary: @str,
|
binary: ~str,
|
||||||
test: bool,
|
test: bool,
|
||||||
parse_only: bool,
|
parse_only: bool,
|
||||||
no_trans: bool,
|
no_trans: bool,
|
||||||
|
@ -395,7 +395,7 @@ pub fn basic_options() -> @options {
|
||||||
target_cpu: ~"generic",
|
target_cpu: ~"generic",
|
||||||
target_feature: ~"",
|
target_feature: ~"",
|
||||||
cfg: ~[],
|
cfg: ~[],
|
||||||
binary: @"rustc",
|
binary: ~"rustc",
|
||||||
test: false,
|
test: false,
|
||||||
parse_only: false,
|
parse_only: false,
|
||||||
no_trans: false,
|
no_trans: false,
|
||||||
|
|
|
@ -197,7 +197,7 @@ pub fn describe_debug_flags() {
|
||||||
|
|
||||||
pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
|
pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
|
||||||
let mut args = args.to_owned();
|
let mut args = args.to_owned();
|
||||||
let binary = args.shift().to_managed();
|
let binary = args.shift();
|
||||||
|
|
||||||
if args.is_empty() { usage(binary); return; }
|
if args.is_empty() { usage(binary); return; }
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ fn get_ast_and_resolve(cpath: &Path,
|
||||||
let input = file_input(cpath.clone());
|
let input = file_input(cpath.clone());
|
||||||
|
|
||||||
let sessopts = @driver::session::options {
|
let sessopts = @driver::session::options {
|
||||||
binary: @"rustdoc",
|
binary: ~"rustdoc",
|
||||||
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
||||||
addl_lib_search_paths: @RefCell::new(libs),
|
addl_lib_search_paths: @RefCell::new(libs),
|
||||||
outputs: ~[driver::session::OutputDylib],
|
outputs: ~[driver::session::OutputDylib],
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub fn run(input: &str, matches: &getopts::Matches) -> int {
|
||||||
let libs = @RefCell::new(libs.move_iter().collect());
|
let libs = @RefCell::new(libs.move_iter().collect());
|
||||||
|
|
||||||
let sessopts = @session::options {
|
let sessopts = @session::options {
|
||||||
binary: @"rustdoc",
|
binary: ~"rustdoc",
|
||||||
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
||||||
addl_lib_search_paths: libs,
|
addl_lib_search_paths: libs,
|
||||||
outputs: ~[session::OutputDylib],
|
outputs: ~[session::OutputDylib],
|
||||||
|
@ -98,7 +98,7 @@ fn runtest(test: &str, cratename: &str, libs: HashSet<Path>) {
|
||||||
let input = driver::str_input(test);
|
let input = driver::str_input(test);
|
||||||
|
|
||||||
let sessopts = @session::options {
|
let sessopts = @session::options {
|
||||||
binary: @"rustdoctest",
|
binary: ~"rustdoctest",
|
||||||
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
|
||||||
addl_lib_search_paths: @RefCell::new(libs),
|
addl_lib_search_paths: @RefCell::new(libs),
|
||||||
outputs: ~[session::OutputExecutable],
|
outputs: ~[session::OutputExecutable],
|
||||||
|
|
|
@ -101,7 +101,7 @@ impl<'a> PkgScript<'a> {
|
||||||
workspace: &Path,
|
workspace: &Path,
|
||||||
id: &'a CrateId) -> PkgScript<'a> {
|
id: &'a CrateId) -> PkgScript<'a> {
|
||||||
// Get the executable name that was invoked
|
// 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
|
// Build the rustc session data structures to pass
|
||||||
// to the compiler
|
// to the compiler
|
||||||
debug!("pkgscript parse: {}", sysroot.display());
|
debug!("pkgscript parse: {}", sysroot.display());
|
||||||
|
|
|
@ -1823,7 +1823,7 @@ fn test_linker_build() {
|
||||||
let workspace = create_local_package(&p_id);
|
let workspace = create_local_package(&p_id);
|
||||||
let workspace = workspace.path();
|
let workspace = workspace.path();
|
||||||
let matches = getopts([], optgroups());
|
let matches = getopts([], optgroups());
|
||||||
let options = build_session_options(@"rustpkg",
|
let options = build_session_options(~"rustpkg",
|
||||||
matches.as_ref().unwrap(),
|
matches.as_ref().unwrap(),
|
||||||
@diagnostic::DefaultEmitter as
|
@diagnostic::DefaultEmitter as
|
||||||
@diagnostic::Emitter);
|
@diagnostic::Emitter);
|
||||||
|
|
|
@ -189,7 +189,7 @@ pub fn compile_input(context: &BuildContext,
|
||||||
// Make the output directory if it doesn't exist already
|
// Make the output directory if it doesn't exist already
|
||||||
fs::mkdir_recursive(&out_dir, io::UserRWX);
|
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!("flags: {}", flags.connect(" "));
|
||||||
debug!("cfgs: {}", cfgs.connect(" "));
|
debug!("cfgs: {}", cfgs.connect(" "));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue