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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user