Add line number and filename in error message
This commit is contained in:
parent
230234f3a8
commit
902460d218
2 changed files with 55 additions and 6 deletions
|
@ -154,7 +154,7 @@ pub fn test(input: &str, cfgs: Vec<String>, libs: SearchPaths, externs: Externs,
|
|||
let mut opts = TestOptions::default();
|
||||
opts.no_crate_inject = true;
|
||||
let mut collector = Collector::new(input.to_string(), cfgs, libs, externs,
|
||||
true, opts, maybe_sysroot);
|
||||
true, opts, maybe_sysroot, &input_str, "input".to_string());
|
||||
find_testable_code(&input_str, &mut collector);
|
||||
test_args.insert(0, "rustdoctest".to_string());
|
||||
testing::test_main(&test_args, collector.tests);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue