summary refs log tree commit diff
path: root/src/librustdoc/test.rs
AgeCommit message (Collapse)AuthorLines
2018-12-20semi-revert libsyntax doctest parsing if a macro is wrapping mainQuietMisdreavus-3/+48
2018-11-05Auto merge of #55515 - QuietMisdreavus:rustdoc-config, r=GuillaumeGomezbors-34/+25
rustdoc: refactor: centralize all command-line argument parsing This is something i've wanted to do for a while, since we keep having to add new arguments to places like `rust_input` or `core::run_core` whenever we add a new CLI flag or the like. Those functions have inflated up to 11-19, and in some cases hiding away the locations where some CLI flags were being parsed, obscuring their use. Now, we have a central place where all command-line configuration occurs, including argument validation. One note about the design: i grouped together all the arguments that `html::render::run` needed, so that i could pass them on from compilation in one lump instead of trying to thread through individual items or clone the entire blob ahead of time. One other thing this adds is that rustdoc also now recognizes all the `-Z` options that rustc does, since we were manually grabbing a few previously. Now we parse a full `DebuggingOptions` struct and hand it directly to rustc when scraping docs.
2018-11-02pass the Options struct instead of individual argsQuietMisdreavus-34/+25
2018-11-01buffer errors from initial tokenization when parsingQuietMisdreavus-4/+11
2018-11-01silence errors found during doctest pre-parsingQuietMisdreavus-1/+11
2018-11-01add a line between extracted crates and everything elseQuietMisdreavus-0/+3
2018-11-01Separates inner attributes from code during doctest parsing.Wesley Norris-23/+37
2018-11-01Tidy up source file and fix typo.Wesley Norris-6/+6
2018-11-01Replaces fn main search and extern crate search with proper parsing.Wesley Norris-14/+81
2018-10-26Remove redundant cloneShotaro Yamada-2/+2
2018-10-18Auto merge of #54349 - GuillaumeGomez:no-example-lint, r=QuietMisdreavusbors-25/+35
[rustdoc] Add lint for doc without codeblocks Fixes #53805. r? @QuietMisdreavus
2018-10-09Use default of preferring static over dynamic linking in rustdoc tests.Felix S. Klock II-1/+0
2018-10-09Add lint for doc without codeblocksGuillaume Gomez-25/+35
2018-09-22Rollup merge of #54350 - Munksgaard:support-edition-in-doc-test, r=steveklabnikPietro Albini-1/+1
Support specifying edition in doc test Fixes #52623 r? @QuietMisdreavus
2018-09-19Add support for running doc test in specific editionPhilip Munksgaard-1/+1
2018-09-18Remove unneeded clone() from testsErich Cordoba-4/+4
The expected.clone() calls were not needed for the tests. This is just to keep consistency between the test cases.
2018-08-19mv codemap source_mapDonato Sciarra-14/+14
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-08-19mv CodeMap SourceMapDonato Sciarra-6/+6
2018-08-09set the syntax edition in the driver's phase 1QuietMisdreavus-2/+1
2018-08-04Move basic_options to impl of DefaultMark Rousskov-2/+2
2018-08-04Normalize variants of CrateType to standard styleMark Rousskov-2/+2
This is a clippy-breaking change.
2018-07-31Further extract error code switchMark Rousskov-4/+6
Removes dependency on UnstableFeatures from markdown rendering
2018-07-31Remove dependency on error handling from find_testable_codeMark Rousskov-4/+6
2018-07-31Provide test configuration through structMark Rousskov-13/+11
This is far more sound than passing many different arguments of the same type.
2018-07-31Provide warnings for invalid code blocks in markdown filesMark Rousskov-1/+1
Previously we would only warn on Rust code but we can also do so when testing markdown (the diag::Handler is available).
2018-07-25Add missing dynTatsuyuki Ishi-1/+1
2018-07-24force the doctest rustc thread to share the name of the testQuietMisdreavus-2/+2
2018-07-20report doctest compile failures correctlyQuietMisdreavus-19/+19
2018-07-20rustdoc: set panic output before starting compiler thread poolQuietMisdreavus-25/+27
2018-07-17Rollup merge of #52385 - GuillaumeGomez:pass-edition-to-parser, ↵kennytm-1/+2
r=QuietMisdreavus Pass edition flags to compiler from rustdoc as expected Fixes #52357.
2018-07-16ItemKindcsmoe-1/+1
2018-07-14Pass edition flags to compiler from rustdoc as expectedGuillaume Gomez-1/+2
2018-06-28Use `Ident`s for associated item definitions in HIRVadim Petrochenkov-2/+2
Remove emulation of hygiene with gensyms
2018-06-20Fix tidyBastien Orivel-1/+3
2018-06-20Replace tempdir by tempfile in librustdocBastien Orivel-2/+2
2018-05-26Use `Ident`s for fields in HIRVadim Petrochenkov-1/+1
2018-05-17Rename trans to codegen everywhere.Irina Popa-8/+8
2018-05-13Add a Rayon thread poolJohn Kåre Alsaker-156/+163
2018-04-21Auto merge of #50080 - klnusbaum:edition_49591, r=Manishearthbors-2/+2
add --edition option This adds an official `edition` flag to the rust compiler
2018-04-20fix some small compile errorsKurtis Nusbaum-2/+2
2018-04-19Tweak some stabilizations in libstdAlex Crichton-1/+1
This commit tweaks a few stable APIs in the `beta` branch before they hit stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were deleted (added in #49381, issue at #49657). The `and_modify` APIs added in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure. Closes #49581 Closes #49657
2018-04-13add -C parameter to rustdocQuietMisdreavus-8/+15
2018-04-10add target features when extracting and running doctestsQuietMisdreavus-5/+10
2018-04-02suppress the default allow(unused) under --display-warningsQuietMisdreavus-2/+25
2018-04-01Rollup merge of #49451 - QuietMisdreavus:epoch-doctests, r=GuillaumeGomezMark Simulacrum-6/+20
rustdoc: add an --edition flag to compile docs/doctests with a certain edition To correspond with the 2018 edition, this adds a (currently unstable) `--edition` flag to rustdoc that makes it compile crates and doctests with the given edition. Once this lands, Cargo should be updated to pass this flag when the edition configuration option is given.
2018-03-28use --edition for doctests, rather than just the crateQuietMisdreavus-5/+13
2018-03-27add --edition flag to rustdocQuietMisdreavus-1/+7
2018-03-26Remove unnecessary trait import.boats-2/+0
2018-03-22Rollup merge of #49188 - memoryleak47:macro_use_doctest, r=QuietMisdreavuskennytm-0/+19
Put `#[macro_use] extern crate <crate>` before fn main() in doctests Closes #49174.