Skip to content

Commit 8ef2559

Browse files
committed
auto merge of rust-lang#12155 : sanxiyn/rust/binary, r=pnkfelix
The field is unused.
2 parents 3870c15 + d1cbdc6 commit 8ef2559

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

src/librustc/driver/driver.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,7 @@ pub fn host_triple() -> ~str {
728728
(env!("CFG_COMPILER")).to_owned()
729729
}
730730
731-
pub fn build_session_options(binary: ~str,
732-
matches: &getopts::Matches)
731+
pub fn build_session_options(matches: &getopts::Matches)
733732
-> @session::Options {
734733
let crate_types = matches.opt_strs("crate-type").flat_map(|s| {
735734
s.split(',').map(|part| {
@@ -864,7 +863,6 @@ pub fn build_session_options(binary: ~str,
864863
maybe_sysroot: sysroot_opt,
865864
target_triple: target,
866865
cfg: cfg,
867-
binary: binary,
868866
test: test,
869867
parse_only: parse_only,
870868
no_trans: no_trans,
@@ -1159,7 +1157,7 @@ mod test {
11591157
Ok(m) => m,
11601158
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
11611159
};
1162-
let sessopts = build_session_options(~"rustc", matches);
1160+
let sessopts = build_session_options(matches);
11631161
let sess = build_session(sessopts, None);
11641162
let cfg = build_configuration(sess);
11651163
assert!((attr::contains_name(cfg, "test")));
@@ -1177,7 +1175,7 @@ mod test {
11771175
f.to_err_msg());
11781176
}
11791177
};
1180-
let sessopts = build_session_options(~"rustc", matches);
1178+
let sessopts = build_session_options(matches);
11811179
let sess = build_session(sessopts, None);
11821180
let cfg = build_configuration(sess);
11831181
let mut test_items = cfg.iter().filter(|m| m.name().equiv(&("test")));

src/librustc/driver/session.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ pub struct Options {
132132
// will be added to the crate AST node. This should not be used for
133133
// anything except building the full crate config prior to parsing.
134134
cfg: ast::CrateConfig,
135-
binary: ~str,
136135
test: bool,
137136
parse_only: bool,
138137
no_trans: bool,
@@ -334,7 +333,6 @@ pub fn basic_options() -> @Options {
334333
maybe_sysroot: None,
335334
target_triple: host_triple(),
336335
cfg: ~[],
337-
binary: ~"rustc",
338336
test: false,
339337
parse_only: false,
340338
no_trans: false,

src/librustc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub fn run_compiler(args: &[~str]) {
274274
_ => d::early_error("multiple input filenames provided")
275275
};
276276

277-
let sopts = d::build_session_options(binary, matches);
277+
let sopts = d::build_session_options(matches);
278278
let sess = d::build_session(sopts, input_file_path);
279279
let odir = matches.opt_str("out-dir").map(|o| Path::new(o));
280280
let ofile = matches.opt_str("o").map(|o| Path::new(o));

src/librustdoc/core.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ fn get_ast_and_resolve(cpath: &Path,
5151
let input = FileInput(cpath.clone());
5252

5353
let sessopts = @driver::session::Options {
54-
binary: ~"rustdoc",
5554
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
5655
addl_lib_search_paths: @RefCell::new(libs),
5756
crate_types: ~[driver::session::CrateTypeDylib],

src/librustdoc/test.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ pub fn run(input: &str, matches: &getopts::Matches) -> int {
4141
let libs = @RefCell::new(libs.move_iter().collect());
4242

4343
let sessopts = @session::Options {
44-
binary: ~"rustdoc",
4544
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
4645
addl_lib_search_paths: libs,
4746
crate_types: ~[session::CrateTypeDylib],
@@ -101,7 +100,6 @@ fn runtest(test: &str, cratename: &str, libs: HashSet<Path>) {
101100
let input = driver::StrInput(test);
102101

103102
let sessopts = @session::Options {
104-
binary: ~"rustdoctest",
105103
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
106104
addl_lib_search_paths: @RefCell::new(libs),
107105
crate_types: ~[session::CrateTypeExecutable],

0 commit comments

Comments
 (0)