summary refs log tree commit diff
path: root/src/librustdoc/test.rs
AgeCommit message (Collapse)AuthorLines
2017-10-03Add fixme regarding remapping paths for doctestsPhilip Craig-0/+2
2017-09-26don't let rustdoc get confused by text "fn main" in a line commentZack M. Davis-1/+15
This is in the matter of #21299.
2017-09-20incr.comp.: Remove IncrementalHashesMap and calculate_svh module.Michael Woerister-1/+1
2017-09-18incr.comp.: Remove tcx from StableHashingContext.Michael Woerister-1/+1
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-9/+10
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-12Remove the `cstore` reference from Session in order to prepare encapsulating ↵Michael Woerister-2/+2
CrateStore access in tcx.
2017-09-09rustc: Remove `DepGraph` handling from rustc_metadataAlex Crichton-2/+2
This should now be entirely tracked through queries, so no need to have a `DepGraph` in the `CStore` object any more!
2017-08-30Make fields of `Span` privateVadim Petrochenkov-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-12/+12
Like #43008 (f668999), but _much more aggressive_.
2017-08-13Rollup merge of #43782 - nrc:include, r=GuillaumeGomezGuillaume Gomez-21/+25
Fix include! in doc tests By making the path relative to the current file. Fixes #43153 [breaking-change] - if you use `include!` inside a doc test, you'll need to change the path to be relative to the current file rather than relative to the working directory.
2017-08-10doc tests: use the filename from the source file for doc test programs, ↵Nick Cameron-21/+25
rather than a dummy name
2017-08-10Implemented #[doc(cfg(...))].kennytm-1/+9
This attribute has two effects: 1. Items with this attribute and their children will have the "This is supported on **** only" message attached in the documentation. 2. The items' doc tests will be skipped if the configuration does not match.
2017-08-10Strip out function implementation when documenting.kennytm-0/+4
This prevents compilation failure we want to document a platform-specific module. Every function is replaced by `loop {}` using the same construct as `--unpretty everybody_loops`. Note also a workaround to #43636 is included: `const fn` will retain their bodies, since the standard library has quite a number of them.
2017-08-10driver: factor out `continue_parse_after_error` so it can be controlled via ↵Nick Cameron-1/+3
driver API
2017-07-02report the total number of errors on compilation failureAriel Ben-Yehuda-24/+14
Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed. This changes the compiler driver API to handle errors more smoothly, and therefore is a compiler-api-[breaking-change]. Fixes #42793.
2017-06-24add `allow_fail` test attributePaul Woolcock-1/+2
This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure.
2017-05-15Remove rustc_llvm dependency from librustcRobin Kruppe-0/+2
Consequently, session creation can no longer initialize LLVM. The few places that use the compiler without going through rustc_driver/CompilerCalls thus need to be careful to manually initialize LLVM (via rustc_trans!) immediately after session creation. This means librustc is not rebuilt when LLVM changes.
2017-05-14Remove rustc_llvm dependency from rustc_metadataRobin Kruppe-2/+3
Move the code for loading metadata from rlibs and dylibs from rustc_metadata into rustc_trans, and introduce a trait to avoid introducing a direct dependency on rustc_trans. This means rustc_metadata is no longer rebuilt when LLVM changes.
2017-05-05Add Options type in libtest and remove argumentGuillaume Gomez-4/+2
2017-05-02Add option to display warnings in rustdocGuillaume Gomez-1/+5
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-2/+2
reproducible builds.
2017-04-22Fix line displayGuillaume Gomez-4/+4
2017-04-22Re-enable hoedown by defaultGuillaume Gomez-21/+34
2017-04-20Fix line display for hoedownGuillaume Gomez-6/+29
2017-04-17Hoedown big comeback!Guillaume Gomez-6/+28
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-7/+7
2017-03-06Remove extra space in test description (of a mod test)Marco A L Barbosa-2/+5
2017-02-16Set rustdoc --test files' path relative to the current directoryGuillaume Gomez-2/+10
2017-02-13Add filename when running rustdoc --test on a markdown fileGuillaume Gomez-2/+7
2017-02-11Add tested item in the rustdoc --test outputGuillaume Gomez-2/+6
2017-02-06Display correct filename with --test optionGuillaume Gomez-16/+21
2017-02-05Auto merge of #38161 - durka:rustdoc-crate-attrs, r=alexcrichtonbors-1/+2
rustdoc: fix doctests with non-feature crate attrs Fixes #38129. The book says that any top-level crate attributes at the beginning of a doctest are moved outside the generated `fn main`, but it was only checking for `#![feature`, not `#![`. These attributes previously caused warnings but were then ignored, so in theory this could change the behavior of doctests in the wild.
2017-02-03Create new flag to test rustdoc --testGuillaume Gomez-1/+2
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-46/+25
2017-02-03Move to my own hoedown repositoryGuillaume Gomez-7/+3
2017-02-03Change thread nameGuillaume Gomez-21/+12
2017-02-03Rework rustdoc test output a bitGuillaume Gomez-9/+4
2017-02-03Truncate output example to 10 linesGuillaume Gomez-1/+6
2017-02-03Add line number and filename in error messageGuillaume Gomez-5/+54
2017-02-03Add information in case of markdown block code test failureggomez-14/+21
2017-01-27rustdoc: Suppress warnings/errors with --testAlex Crichton-0/+4
Threads spawned by the test framework have their output captured by default, so for `rustdoc --test` threads this propagates that capturing to the spawned thread that we now have. Closes #39327
2017-01-20Rollup merge of #39142 - nikomatsakis:issue-38973, r=brsonAlex Crichton-14/+21
run rustdoc tests in the same sort of thread rustc runs in Not sure yet if this is the problem in #38973 but seems like an improvement regardless. r? @brson
2017-01-19Stop warning when doc testing proc macro cratesJosh-0/+1
Add the actually_rustdoc option to the session that is passed to phase_2_configure_and_expand function inside the rustdoc test module. This prevents the warning code from triggering when parsing proc_macro_derive attributes, just like when `--test` is normally invoked.
2017-01-17run rustdoc tests in the same sort of thread rustc runs inNiko Matsakis-14/+21
2016-12-28Auto merge of #38449 - eddyb:lazy-10, r=nikomatsakisbors-1/+1
[10/n] Split constants and functions' arguments into disjoint bodies. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38053) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> Finishes the signature-body split started in #37918, namely: * `trait` items are separated just like `impl` items were, for uniformity, closing #37712 * `static`s, `const`s (including associated ones), `enum` discriminants and array lengths get bodies * even the count in "repeat expressions", i.e. `n` in `[x; n]`, which fixes #24414 * arguments' patterns are moved to the bodies, with the types staying in `FnDecl` * `&self` now desugars to `self: &Self` instead of `self: &_` (similarly for other `self` forms) * `astconv`'s and metadata's (for rustdoc) informative uses are explicitly ignored for the purposes of the dep graph. this could be fixed in the future by hashing the exact information being extracted about the arguments as opposed to generating a dependency on *the whole body*
2016-12-28rustc: always print nested nodes where a HIR map is available.Eduard-Mihai Burtescu-1/+1
2016-12-24Teach `rustdoc --test` about `--sysroot`, pass it when testing rustAidan Hobson Sayers-9/+16
This permits rustdoc tests to work in stage0
2016-12-12Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichtonbors-1/+1
Rename 'librustc_unicode' crate to 'libstd_unicode'. Fixes https://github.com/rust-lang/rust/issues/26554.
2016-12-09rustdoc: fix doctests with non-feature crate attrsAlex Burka-1/+2
2016-12-08Fix doc-tests on exported `macro_rules!`.Jeffrey Seyfried-0/+4