summary refs log tree commit diff
path: root/src/test/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
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-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
2022-09-22Rollup merge of #102037 - jyn514:normalize-docs, r=lcnrDylan DPC-0/+1
Make cycle errors recoverable In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, ```@jackh726``` has said we need to be careful about overflow errors: https://github.com/rust-lang/rust/pull/91430#issuecomment-983997013 > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered. Helps with https://github.com/rust-lang/rust/issues/81091. r? ```@lcnr``` cc ```@matthewjasper```
2022-09-19Make the `normalize-overflow` rustdoc test actually do somethingJoshua Nelson-0/+2
Since https://github.com/rust-lang/rust/pull/88679, rustdoc doesn't load crates eagerly. Add an explicit `extern crate` item to make sure the crate is loaded and the bug reproduces. You can verify this fix by adding `// compile-flags: -Znormalizing-docs` and running the test.
2022-09-19Make cycle errors recoverableJoshua Nelson-0/+1
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
2022-09-18Remove -Znew-llvm-pass-managerJosh Stone-1/+0
2022-09-14rustdoc: add test cases for turning ``[Vec<T>]`` into ``[`Vec<T>`]``Michael Howell-1/+43
2022-09-13Auto merge of #100101 - BelovDV:issue-99429, r=petrochenkovbors-0/+1
change rlib format to distinguish native dependencies Another one method to solve problem mentioned in #99429. Changed .rlib format, it contains all bundled native libraries as archieves. At link time rlib is unpacked and native dependencies linked separately. New behavior hidden under separate_native_rlib_dependencies flag.
2022-09-12Rollup merge of #101735 - notriddle:notriddle/backslash-escaped-html, ↵Guillaume Gomez-1/+14
r=GuillaumeGomez rustdoc: fix treatment of backslash-escaped HTML Try generating HTML for this markup: \<a href="https://example.com">example</a> It will produce text, not HTML, in both rustdoc's real HTML output and in the commonmark reference implementation: https://spec.commonmark.org/dingus/?text=%5C%3Ca%20href%3D%22https%3A%2F%2Fexample.com%22%3Eexample%3C%2Fa%3E
2022-09-12Rollup merge of #101732 - Nemo157:gate-rustdoc-missing-examples, ↵Guillaume Gomez-34/+82
r=GuillaumeGomez Feature gate the `rustdoc::missing_doc_code_examples` lint Moves the lint from being implicitly active on nightly `rustdoc` to requiring a feature to activate, like other unstable lints. Uses the new tracking issue https://github.com/rust-lang/rust/issues/101730
2022-09-12Rollup merge of #101731 - notriddle:notriddle/more-improved-html-check, ↵Guillaume Gomez-10/+250
r=GuillaumeGomez rustdoc: improve rustdoc HTML suggestions handling of nested generics Based on some poor suggestions produced when stablizing this lint and running it on `manformed-generics.rs` in #101720
2022-09-12rustdoc: fix treatment of backslash-escaped HTMLMichael Howell-1/+14
Try generating HTML for this markup: \<a href="https://example.com">example</a> It will produce text, not HTML, in both rustdoc's real HTML output and in the commonmark reference implementation: https://spec.commonmark.org/dingus/?text=%5C%3Ca%20href%3D%22https%3A%2F%2Fexample.com%22%3Eexample%3C%2Fa%3E
2022-09-12Feature gate the rustdoc::missing_doc_code_examples lintWim Looman-34/+82
2022-09-12rustdoc: improve rustdoc HTML suggestions handling of nested genericsMichael Howell-10/+250
Based on some poor suggestions produced when stablizing this lint and running it on `manformed-generics.rs`
2022-09-12change rlib format to discern native dependenciesDaniil Belov-0/+1
2022-09-09Add inline-llvm option for disabling/enabling LLVM inliningYan Chen-0/+1
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-28extend attrs if local_def_id existsTakayuki Maeda-0/+14
2022-08-12Rollup merge of #100229 - RalfJung:extra-const-ub-checks, r=lcnrDylan DPC-0/+1
add -Zextra-const-ub-checks to enable more UB checking in const-eval Cc https://github.com/rust-lang/rust/issues/99923 r? `@oli-obk`
2022-08-07add -Zextra-const-ub-checks to enable more UB checking in const-evalRalf Jung-0/+1
2022-08-07Remove even more box syntax uses from src/testest31-5/+5
Prior work, notably 6550021124451628b1efc60c59284465b109e3aa from #88316 has removed box syntax from most of the testsuite. However, some tests were left out. This commit removes box_syntax uses from more locations in src/test. Some tests that are very box syntax specific are not being migrated.
2022-08-03Rollup merge of #100029 - hdelc:master, r=cjgillotMatthias Krüger-1/+1
Prevent ICE for `doc_alias` on match arm, statement, expression Fixes #99777. This is a pretty minimal fix that should be safe, since rustdoc doesn't generate documentation for match arms, statements, or expressions. I mentioned in the linked issue that the `doc_alias` target checking should probably be improved to avoid future ICEs, but as a new contributor, I'm not confident enough with the HIR types to make a larger change.