rust/src/librustdoc
Corey Farwell 722baed173 Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, r=alexcrichton
Display correct filename with --test option

Fixes #39592.

With the current files:

```rust
pub mod foo;

/// This is a Foo;
///
/// ```
/// println!("baaaaaar");
/// ```
pub struct Foo;

/// This is a Bar;
///
/// ```
/// println!("fooooo");
/// ```
pub struct Bar;
```

```rust
// note the whitespaces
/// ```
/// println!("foo");
/// ```
pub fn foo() {}
```

It displays:

```
./build/x86_64-apple-darwin/stage1/bin/rustdoc --test test.rs

running 3 tests
test test.rs - line 13 ... ok
test test.rs - line 5 ... ok
test foo.rs - line 2 ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured
```

```

` ``
println!("lol");
` ``

asdjnfasd

asd
```

It displays:

```
./build/x86_64-apple-darwin/stage1/bin/rustdoc --test foo.md

running 1 test
test <input> - line 3 ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```

r? @alexcrichton
2017-02-08 10:19:55 -05:00
..
clean make lifetimes that only appear in return type early-bound 2017-02-05 16:30:03 -05:00
html Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, r=alexcrichton 2017-02-08 10:19:55 -05:00
passes rustdoc: use libsyntax ast::Attribute instead of "cleaning" them. 2016-11-24 01:40:52 +02:00
build.rs std: Remove cfg(cargobuild) annotations 2017-02-06 08:42:54 -08:00
Cargo.toml rustc: keep track of tables everywhere as if they were per-body. 2017-01-06 22:23:29 +02:00
core.rs rustc: rename TyCtxt's map field to hir. 2017-01-26 13:41:28 +02:00
doctree.rs rustc: move function arguments into hir::Body. 2016-12-28 11:29:19 +02:00
externalfiles.rs Remove unnecessary pub function classifier. 2016-10-09 00:17:50 -04:00
fold.rs Remove redundant 'Variant' in variant names, stop reexporting. 2016-10-02 21:58:23 -04:00
lib.rs Fix full path being output with rustdoc -h 2017-01-26 01:35:00 -05:00
markdown.rs Display correct filename with --test option 2017-02-06 22:11:03 +01:00
plugins.rs Remove rustdocs json format 2016-04-07 06:01:55 +02:00
test.rs Display correct filename with --test option 2017-02-06 22:11:03 +01:00
visit_ast.rs rustc: rename TyCtxt's map field to hir. 2017-01-26 13:41:28 +02:00
visit_lib.rs rustdoc: we can now assume DocContext always has a TyCtxt. 2016-11-24 01:40:56 +02:00