Skip to content

Commit

Permalink
force binary filename for compiled doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Jan 4, 2019
1 parent c0bbc39 commit 0b55c79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/test.rs
Expand Up @@ -273,7 +273,7 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
target_features::add_configuration(&mut cfg, &sess, &*codegen_backend);
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 {
control.after_analysis.stop = Compilation::Stop;
Expand All @@ -286,8 +286,8 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
&cstore,
&None,
&input,
&out,
&None,
&out,
None,
&control
)
Expand Down
7 changes: 7 additions & 0 deletions src/test/rustdoc/doctest-manual-crate-name.rs
@@ -0,0 +1,7 @@
// compile-flags:--test

//! ```
//! #![crate_name="asdf"]
//!
//! println!("yo");
//! ```

0 comments on commit 0b55c79

Please sign in to comment.