| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-09-14 | Rename --display-warnings to --display-doctest-warnings | Guillaume Gomez | -3/+4 | |
| 2021-02-11 | Fix injected errors when running doctests on a crate named after a keyword | Joshua Nelson | -4/+4 | |
| Unfortunately, this can't currently be tested. The problem is that we need the file to be compiled first to then be used as dependency, which cannot be done currently unfortunately in the rustdoc test suites. Example: ```rust // name this file "foo.rs" /// ``` /// let x = foo::foo(); /// ``` pub fn foo() {} ``` If you run `rustdoc --test foo.rs`, you'll get: ``` running 1 test test foo.rs - foo (line 1) ... FAILED failures: ---- foo.rs - foo (line 1) stdout ---- error[E0463]: can't find crate for `foo` --> foo.rs:0:1 | 2 | extern crate foo; | ^^^^^^^^^^^^^^^^^ can't find crate ``` If a test were possible, it would look something like ````rust #![crate_name = "mod"] #![crate_type = "lib"] //! ``` //! // NOTE: requires that the literal string 'mod' appears in the doctest for //! // the bug to appear //! assert_eq!(1, 1); //! ``` ```` | ||||
| 2020-12-29 | Remove unnecessary semicolon from Rustdoc-generated code | Aaron Hill | -2/+2 | |
| 2020-12-20 | add an attribute to inner doctest fn | Arpad Borsos | -3/+3 | |
| 2020-12-19 | Remap instrument-coverage line numbers in doctests | Arpad Borsos | -17/+52 | |
| This uses the `SourceMap::doctest_offset_line` method to re-map line numbers from doctests. Remapping columns is not yet done. Part of issue #79417. | ||||
| 2020-11-17 | Update doctest tests | Guillaume Gomez | -34/+34 | |
| 2020-08-27 | Rename rustdoc/test -> rustdoc/doctest | Aleksey Kladov | -0/+279 | |
| This modules contains the implementation of doctests, and not the tests of rustdoc itself. This name is confusing, so let's rename it to doctest for clarity. | ||||
