Skip to content

rustdoc: properly detect input file exists #27074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn main() {
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
let s = env::args().collect::<Vec<_>>();
main_args(&s)
}).unwrap().join().unwrap();
}).unwrap().join().unwrap_or(101);
process::exit(res as i32);
}

Expand Down Expand Up @@ -273,7 +273,6 @@ pub fn main_args(args: &[String]) -> isize {
!matches.opt_present("markdown-no-toc")),
(false, false) => {}
}

let out = match acquire_input(input, externs, &matches) {
Ok(out) => out,
Err(s) => {
Expand Down Expand Up @@ -375,12 +374,12 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
info!("starting to run rustc");

let (tx, rx) = channel();
std::thread::spawn(move || {
rustc_driver::monitor(move || {
use rustc::session::config::Input;

tx.send(core::run_core(paths, cfgs, externs, Input::File(cr),
triple)).unwrap();
}).join().map_err(|_| "rustc failed").unwrap();
});
let (mut krate, analysis) = rx.recv().unwrap();
info!("finished with rustc");
let mut analysis = Some(analysis);
Expand Down