Skip to content

Commit 0b55c79

Browse files
force binary filename for compiled doctests
1 parent c0bbc39 commit 0b55c79

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/librustdoc/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
273273
target_features::add_configuration(&mut cfg, &sess, &*codegen_backend);
274274
sess.parse_sess.config = cfg;
275275

276-
let out = Some(outdir.lock().unwrap().path().to_path_buf());
276+
let out = Some(outdir.lock().unwrap().path().join("rust_out"));
277277

278278
if no_run {
279279
control.after_analysis.stop = Compilation::Stop;
@@ -286,8 +286,8 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
286286
&cstore,
287287
&None,
288288
&input,
289-
&out,
290289
&None,
290+
&out,
291291
None,
292292
&control
293293
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// compile-flags:--test
2+
3+
//! ```
4+
//! #![crate_name="asdf"]
5+
//!
6+
//! println!("yo");
7+
//! ```

0 commit comments

Comments
 (0)