about summary refs log tree commit diff
path: root/src/test/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-9143/+0
2023-01-09Fix help docs for -Zallow-featuresEric Huss-1/+1
2023-01-06use smaller spans for missing lifetime/generic argsTakayuki Maeda-22/+22
fix rustdoc ui test
2023-01-04Rename stock solver to classicMichael Goulet-1/+1
2023-01-04Update tests, etcMichael Goulet-1/+1
2023-01-04Rollup merge of #106274 - jyn514:dump-mono-stats, r=lqdMatthias Krüger-1/+2
Add JSON output to -Zdump-mono-stats Follow-up to https://github.com/rust-lang/rust/pull/105481 r? `@lqd` cc `@wesleywiser`
2023-01-02Add json output to `-Zdump-mono-stats`Joshua Nelson-1/+2
This allows analyzing the output programatically; for example, finding the item with the highest `total_estimate`. I also took the liberty of adding `untracked` tests to `rustc_session` and documentation to the unstable book for `dump-mono-items`.
2023-01-02Add regression test for #96287Guillaume Gomez-0/+32
2023-01-02Add regression test for #105742Guillaume Gomez-0/+425
2023-01-02Add regression test for #105737Guillaume Gomez-0/+16
2023-01-02Add regression test for #105334Guillaume Gomez-0/+11
2023-01-02Add regression test for #106226Guillaume Gomez-0/+12
2022-12-29Fix index out of bounds issues in rustdocyukang-0/+16
2022-12-22Auto merge of #104889 - GuillaumeGomez:fix-impl-block-in-const-expr, r=notriddlebors-7/+34
Fix impl block in const expr Fixes #83026. The problem was that we didn't visit block expressions. Considering how big the [walk_expr](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_hir/intravisit.rs.html#678) function is, I decided to instead implement the `hir` visitor on the struct. It also answers the question which was in a comment for `RustdocVisitor`: we should have used a visitor instead of our ad-hoc implementation. Adding this visitor also added some extra checks that weren't present before (check changes in `rustdoc-ui` tests). r? `@notriddle`
2022-12-20Add `-Zno-jump-tables`Miguel Ojeda-0/+1
This flag mimics GCC/Clang's `-fno-jump-tables` [1][2], which makes the codegen backend avoid generating jump tables when lowering switches. In the case of LLVM, the `"no-jump-tables"="true"` function attribute is added to every function. The kernel currently needs it for x86 when enabling IBT [3], as well as for Alpha (plus VDSO objects in MIPS/LoongArch). [1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables [2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables [3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83 Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-12-14bless rustdoc test for unstable optionsRémy Rakic-0/+1
2022-12-11Auto merge of #105457 - GuillaumeGomez:prevent-auto-blanket-impl-retrieval, ↵bors-0/+39
r=notriddle rustdoc: Prevent auto/blanket impl retrieval if there were compiler errors Fixes https://github.com/rust-lang/rust/issues/105404. I'm not sure happy about this fix but since it's how passes work (ie, even if there are errors, it runs all passes), I think it's fine as is. Just as a sidenote: I also gave a try to prevent running all passes in case there were compiler errors but then a lot of rustdoc tests were failing so I went for this fix instead. r? `@notriddle`
2022-12-10Migrate parts of `rustc_expand` to session diagnosticsnils-2/+2
This migrates everything but the `mbe` and `proc_macro` modules. It also contains a few cleanups and drive-by/accidental diagnostic improvements which can be seen in the diff for the UI tests.
2022-12-09Rollup merge of #105427 - ↵Matthias Krüger-0/+20
GuillaumeGomez:dont-silently-ignore-rustdoc-errors, r=notriddle Dont silently ignore rustdoc errors I applied the suggestions from https://github.com/rust-lang/rust/pull/104995 and also checked the rustdoc-ui error but couldn't reproduce it. r? `@notriddle`
2022-12-08Update rustdoc test to check its error outputGuillaume Gomez-0/+20
2022-12-08Add regression test for #105404Guillaume Gomez-0/+39
2022-12-07Update newly failing UI testsGuillaume Gomez-7/+34
2022-12-04Add -Z maximal-hir-to-mir-coverage flagWill Crichton-0/+1
2022-12-04Auto merge of #104757 - camelid:consolidate-lints, ↵bors-6/+2
r=GuillaumeGomez,jyn514,Manishearth Consolidate rustdoc's lint passes into a single pass This should improve performance and simplify the code. r? `@GuillaumeGomez`
2022-12-02Remove `-Zno-interleave-lints`.Nicholas Nethercote-1/+0
Because it complicates lint implementation greatly.
2022-11-22Consolidate rustdoc's lint passes into a single passNoah Lev-6/+2
This should improve performance and simplify the code.
2022-11-07Rollup merge of #104052 - TaKO8Ki:fix-103997, r=notriddleDylan DPC-0/+16
Fix `resolution_failure` ICE Fixes #103997
2022-11-07return `None` when def_kind is `DefKind::Use`Takayuki Maeda-0/+16
2022-11-03roll another resolution logic in rustdocDeadbeef-19/+1
2022-11-01Auto merge of #103217 - mejrs:track, r=eholkbors-0/+21
Track where diagnostics were created. This implements the `-Ztrack-diagnostics` flag, which uses `#[track_caller]` to track where diagnostics are created. It is meant as a debugging tool much like `-Ztreat-err-as-bug`. For example, the following code... ```rust struct A; struct B; fn main(){ let _: A = B; } ``` ...now emits the following error message: ``` error[E0308]: mismatched types --> src\main.rs:5:16 | 5 | let _: A = B; | - ^ expected struct `A`, found struct `B` | | | expected due to this -Ztrack-diagnostics: created at compiler\rustc_infer\src\infer\error_reporting\mod.rs:2275:31 ```
2022-10-30Rollup merge of #103588 - weihanglo:rustdoc/url-redirect, r=notriddleDylan DPC-6/+6
rustdoc: add missing URL redirect https://github.com/rust-lang/rust/pull/94753 missed some redirect settings, and one of the missing URL shows up in an error message. This PR adds those redirects.
2022-10-27fix(rustdoc): add missing URL component for error messagesWeihang Lo-6/+6
2022-10-26Adjust normalizationmejrs-3/+3
2022-10-24rustdoc: parse self-closing tags and attributes in `invalid_html_tags`Michael Howell-0/+150
Fixes #103460
2022-10-24Add more normalization and testsmejrs-3/+7
2022-10-24Address some commentsmejrs-0/+17
2022-10-23Introduce dedicated `-Zdylib-lto` flag for enabling LTO on `dylib`sJakub Beránek-0/+1
2022-10-14Add UI test for invalid `doc(cfg_hide(...))` attributesGuillaume Gomez-0/+51
2022-10-13Add test for issue 102986Maybe Waffle-0/+18
2022-10-12Use `tidy-alphabetical` in the compilerNilstrieb-22/+22
2022-10-12Rollup merge of #102890 - camsteffen:adt-sized-representability, r=cjgillotDylan DPC-36/+5
Check representability in adt_sized_constraint Now that representability is a query, we can use it to preemptively avoid a cycle in `adt_sized_constraint`. I moved the representability check into `check_mod_type_wf` to avoid a scenario where rustc quits before checking all the types for representability. This also removes the check from rustdoc, which is alright AFAIK. r? ``@cjgillot``
2022-10-10Check representability in adt_sized_constraintCameron Steffen-36/+5
2022-10-10Update rustdoc testsGuillaume Gomez-13/+78
2022-10-07Rewrite representabilityCameron Steffen-6/+6
2022-10-06Rollup merge of #102725 - nnethercote:rm-Z-time, r=davidtwcoMatthias Krüger-1/+0
Remove `-Ztime` Because it has a lot of overlap with `-Ztime-passes` but is generally less useful. Plus some related cleanups. Best reviewed one commit at a time. r? `@davidtwco`
2022-10-06Remove `-Ztime` option.Nicholas Nethercote-1/+0
The compiler currently has `-Ztime` and `-Ztime-passes`. I've used `-Ztime-passes` for years but only recently learned about `-Ztime`. What's the difference? Let's look at the `-Zhelp` output: ``` -Z time=val -- measure time of rustc processes (default: no) -Z time-passes=val -- measure time of each rustc pass (default: no) ``` The `-Ztime-passes` description is clear, but the `-Ztime` one is less so. Sounds like it measures the time for the entire process? No. The real difference is that `-Ztime-passes` prints out info about passes, and `-Ztime` does the same, but only for a subset of those passes. More specifically, there is a distinction in the profiling code between a "verbose generic activity" and an "extra verbose generic activity". `-Ztime-passes` prints both kinds, while `-Ztime` only prints the first one. (It took me a close reading of the source code to determine this difference.) In practice this distinction has low value. Perhaps in the past the "extra verbose" output was more voluminous, but now that we only print stats for a pass if it exceeds 5ms or alters the RSS, `-Ztime-passes` is less spammy. Also, a lot of the "extra verbose" cases are for individual lint passes, and you need to also use `-Zno-interleave-lints` to see those anyway. Therefore, this commit removes `-Ztime` and the associated machinery. One thing to note is that the existing "extra verbose" activities all have an extra string argument, so the commit adds the ability to accept an extra argument to the "verbose" activities.
2022-10-03Fix rustdoc ICE in invalid_rust_codeblocks lintNilstrieb-1/+22
The diagnostic message extraction code didn't handle translations yet.
2022-10-01bless rustdoc-uiMaybe Waffle-48/+48
2022-09-25Rollup merge of #101997 - cuviper:drop-legacy-pm, r=nikicfee1-dead-1/+0
Remove support for legacy PM This removes support for optimizing with LLVM's legacy pass manager, as well as the unstable `-Znew-llvm-pass-manager` option. We have been defaulting to the new PM since LLVM 13 (except for s390x that waited for 14), and LLVM 15 removed support altogether. The only place we still use the legacy PM is for writing the output file, just like `llc` does. cc #74705 r? ``@nikic``
2022-09-23rustdoc: Stabilize --diagnostic-widthEric Huss-1/+1