force binary filename for compiled doctests

This commit is contained in:
QuietMisdreavus 2019-01-04 09:57:17 -06:00
parent c0bbc3927e
commit 0b55c79072
2 changed files with 9 additions and 2 deletions

View File

@ -273,7 +273,7 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
target_features::add_configuration(&mut cfg, &sess, &*codegen_backend); target_features::add_configuration(&mut cfg, &sess, &*codegen_backend);
sess.parse_sess.config = cfg; sess.parse_sess.config = cfg;
let out = Some(outdir.lock().unwrap().path().to_path_buf()); let out = Some(outdir.lock().unwrap().path().join("rust_out"));
if no_run { if no_run {
control.after_analysis.stop = Compilation::Stop; control.after_analysis.stop = Compilation::Stop;
@ -286,8 +286,8 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
&cstore, &cstore,
&None, &None,
&input, &input,
&out,
&None, &None,
&out,
None, None,
&control &control
) )

View File

@ -0,0 +1,7 @@
// compile-flags:--test
//! ```
//! #![crate_name="asdf"]
//!
//! println!("yo");
//! ```