about summary refs log tree commit diff
path: root/src/librustdoc/test.rs
AgeCommit message (Collapse)AuthorLines
2020-07-16Update code to new invalid_codeblock_attributes lint nameGuillaume Gomez-3/+3
2020-07-10Avoid "whitelist"Tamir Duberstein-3/+3
Other terms are more inclusive and precise.
2020-07-09Rollup merge of #74079 - nnethercote:session-globals, r=nikomatsakisManish Goregaokar-2/+1
Eliminate confusing "globals" terminology. There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs` r? @Aaron1011
2020-07-09Eliminate confusing "globals" terminology.Nicholas Nethercote-2/+1
There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs`
2020-07-07rustdoc: Rename invalid_codeblock_attribute lint to be pluralOliver Middleton-1/+1
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-9/+9
2020-06-11Rollup merge of #72180 - euclio:rustdoc-test-extra-space, r=Dylan-DPCDylan DPC-1/+5
remove extra space from crate-level doctest names Before: ``` running 2 tests test src/test/rustdoc-ui/doctest-output.rs - foo::bar (line 11) ... ok test src/test/rustdoc-ui/doctest-output.rs - (line 5) ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ``` After: ``` running 2 tests test src/test/rustdoc-ui/doctest-output.rs - foo::bar (line 11) ... ok test src/test/rustdoc-ui/doctest-output.rs - (line 5) ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ```
2020-05-31Auto merge of #72767 - pnkfelix:track-devirtualized-filenames-issue-70924, ↵bors-2/+2
r=eddyb Track devirtualized filenames Split payload of FileName::Real to track both real and virtualized paths. (Such splits arise from metadata refs into libstd; the virtualized paths look like `/rustc/1.45.0/src/libstd/io/cursor.rs` rather than `/Users/felixklock/Dev/Mozilla/rust.git/src/libstd/io/cursor.rs`) This way, we can emit the virtual name into things like the like the StableSourceFileId (as was done back before PR #70642) that ends up in incremental build artifacts, while still using the devirtualized file path when we want to access the file. Fix #70924
2020-05-29Split payload of FileName::Real to track both real and virutalized paths.Felix S. Klock II-2/+2
Such splits arise from metadata refs into libstd. This way, we can (in a follow on commit) continue to emit the virtual name into things like the like the StableSourceFileId that ends up in incremetnal build artifacts, while still using the devirtualized file path when we want to access the file. Note that this commit is intended to be a refactoring; the actual fix to the bug in question is in a follow-on commit.
2020-05-27rustc_session: Cleanup session creationVadim Petrochenkov-1/+1
2020-05-26Auto merge of #71900 - GuillaumeGomez:clean-up-rustdoc, r=ollie27,kinnisonbors-3/+3
Clean up rustdoc source code Fixes #70498. r? @kinnison cc @rust-lang/rustdoc
2020-05-15remove extra space from crate-level doctest namesAndy Russell-1/+5
2020-05-11Fix clippy warningsMatthias Krüger-2/+1
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-09End unification of exit codes in librustdocGuillaume Gomez-3/+3
2020-05-08Rollup merge of #71581 - GuillaumeGomez:unify-lints-handling, r=kinnisonDylan DPC-33/+9
Unify lints handling in rustdoc This is a small cleanup. The goal is to unify a bit things to make the reading simpler. r? @kinnison cc @rust-lang/rustdoc
2020-05-02cleanup: `config::CrateType` -> `CrateType`Vadim Petrochenkov-7/+6
2020-04-27Unify lints handling in rustdocGuillaume Gomez-33/+9
2020-04-23Create new rustdoc lint to check for code blocks tagsGuillaume Gomez-16/+81
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-1/+1
2020-04-10fix target & runtool args orderTom Dohrmann-2/+7
2020-04-02use direct import for ErrorReportedMazdak Farrokhzad-1/+1
2020-03-31improve folder name for persistent doc testsLuro02-40/+63
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-2/+2
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-2/+2
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-1/+1
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-3/+3
2020-03-15Auto merge of #68944 - Zoxc:hir-map, r=eddybbors-5/+6
Use queries for the HIR map r? @eddyb cc @michaelwoerister
2020-03-15Rollup merge of #69988 - petrochenkov:nomacrodef, r=CentrilMazdak Farrokhzad-1/+1
rustc_metadata: Remove `rmeta::MacroDef` And other related cleanups. Follow-up to https://github.com/rust-lang/rust/pull/66364. r? @Centril
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-4/+4
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-1/+2
2020-03-14rustc_metadata: Remove `rmeta::MacroDef`Vadim Petrochenkov-1/+1
Use `ast::MacroDef` instead. Also remove `Session::imported_macro_spans`, external macros have spans now.
2020-03-12ast: `Mac`/`Macro` -> `MacCall`Vadim Petrochenkov-1/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-2/+2
2020-02-29Make it build againVadim Petrochenkov-2/+2
2020-02-28remove redundant clones, references to operands, explicit boolean ↵Matthias Krüger-1/+1
comparisons and filter(x).next() calls.
2020-02-22Rename CodeMap to SourceMap follow upMaxim Zholobak-2/+2
2020-02-07Rollup merge of #68889 - Zoxc:hir-krate, r=eddybDylan DPC-2/+2
Move the `hir().krate()` method to a query and remove the `Krate` dep node r? @eddyb cc @michaelwoerister
2020-02-06Remove the `Forest` typeJohn Kåre Alsaker-1/+1
2020-02-06Move the `krate` method to Hir and remove the Krate dep nodeJohn Kåre Alsaker-1/+1
2020-02-06Add a Hir wrapper typeJohn Kåre Alsaker-1/+1
2020-02-06Auto merge of #68664 - tspiteri:no_run-complete-build, r=nikomatsakisbors-1/+1
rustdoc: attempt full build for compile_fail test Some code fails when doing a full build but does not fail when only emitting metadata. This commit makes sure compile_fail tests for such code behave as expected, that is, the test succeeds because the compilation fails. Fixes #67771.
2020-02-04remove redundant imports (clippy::single_component_path_imports)Matthias Krüger-1/+0
2020-02-01syntax: reexport attr globalsMazdak Farrokhzad-1/+1
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-1/+1
2020-02-011. move node_id to syntaxMazdak Farrokhzad-1/+1
2. invert rustc_session & syntax deps 3. drop rustc_session dep in rustc_hir
2020-02-01syntax: move GLOBALS to attr moduleMazdak Farrokhzad-1/+1
2020-01-30rustdoc: attempt full build for compile_fail testTrevor Spiteri-1/+1
Some code fails when doing a full build but does not fail when only emitting metadata. This commit makes sure compile_fail tests for such code behave as expected, that is, the test succeeds because the compilation fails.
2020-01-20Rollup merge of #68357 - ollie27:rustdoc_test_errors, r=GuillaumeGomezDylan DPC-3/+7
rustdoc: Fix handling of compile errors when running `rustdoc --test` * Call `abort_if_errors` so all errors actually stop rustdoc. * Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message. * Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors. Fixes #52243 Fixes #54010 r? @GuillaumeGomez
2020-01-18rustdoc: Fix handling of compile errors when running `rustdoc --test`Oliver Middleton-3/+7
* Call `abort_if_errors` so all errors actually stop rustdoc. * Don't panic with "compiler aborted in rustdoc!", instead just exit to avoid the ugly panic message. * Use rlib as the crate type when searching for doctests matching what is used for doc generation so `#[no_std]` crates don't create "no global memory allocator" errors.
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-2/+2