adds DocTest filename variant, refactors doctest_offset out of source_map, fixes remaining test failures
This commit is contained in:
parent
88130f1796
commit
f0f8aa9e05
12 changed files with 52 additions and 54 deletions
|
|
@ -72,7 +72,8 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf) {
|
|||
driver::spawn_thread_pool(opts, |opts| {
|
||||
let (sess, cstore, codegen_backend) = basic_sess(opts);
|
||||
let control = CompileController::basic();
|
||||
let input = Input::Str { name: FileName::Anon, input: code };
|
||||
let name = FileName::anon_source_code(&code);
|
||||
let input = Input::Str { name, input: code };
|
||||
let _ = compile_input(
|
||||
codegen_backend,
|
||||
&sess,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ error[E0425]: cannot find value `no` in this scope
|
|||
3 | no
|
||||
| ^^ not found in this scope
|
||||
|
||||
thread '$DIR/failed-doctest-output.rs - OtherStruct (line 27)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:323:13
|
||||
thread '$DIR/failed-doctest-output.rs - OtherStruct (line 27)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:327:13
|
||||
note: Run with `RUST_BACKTRACE=1` for a backtrace.
|
||||
|
||||
---- $DIR/failed-doctest-output.rs - SomeStruct (line 21) stdout ----
|
||||
|
|
@ -21,7 +21,7 @@ thread '$DIR/failed-doctest-output.rs - SomeStruct (line 21)' panicked at 'test
|
|||
thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1
|
||||
note: Run with `RUST_BACKTRACE=1` for a backtrace.
|
||||
|
||||
', src/librustdoc/test.rs:358:17
|
||||
', src/librustdoc/test.rs:362:17
|
||||
|
||||
|
||||
failures:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue