rustdoc: Accept string source in core::run_core
This is wanted by external tooling that uses rustdoc. There are likely some bugs when actually generating HTML output (which may expect to be able to read the source) but all I need for now is the cleaned crate and analysis.
This commit is contained in:
parent
aaf595eab9
commit
e930aeb32b
4 changed files with 23 additions and 13 deletions
|
@ -350,8 +350,10 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
|
|||
info!("starting to run rustc");
|
||||
|
||||
let (mut krate, analysis) = std::thread::Thread::scoped(move |:| {
|
||||
use rustc::session::config::Input;
|
||||
|
||||
let cr = cr;
|
||||
core::run_core(paths, cfgs, externs, &cr, triple)
|
||||
core::run_core(paths, cfgs, externs, Input::File(cr), triple)
|
||||
}).join().map_err(|_| "rustc failed").unwrap();
|
||||
info!("finished with rustc");
|
||||
let mut analysis = Some(analysis);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue