1
Fork 0

Add line number and filename in error message

This commit is contained in:
Guillaume Gomez 2016-10-02 02:11:45 +02:00
parent 230234f3a8
commit 902460d218
2 changed files with 55 additions and 6 deletions

View file

@ -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);