about summary refs log tree commit diff
path: root/tests/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2023-05-06Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkinMatthias Krüger-0/+30
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy```` Fixes https://github.com/rust-lang/rust/issues/109486.
2023-05-05Improve check-cfg diagnostics (part 1)Urgau-2/+2
2023-05-01Make the BUG_REPORT_URL configurable by toolsjyn-0/+30
This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. - Switch clippy to the new hook This also adds a `extra_info` callback so clippy can include its own version number, which differs from rustc's. - Call `install_ice_hook` in rustfmt
2023-05-01Don't use implied trait predicates in gather_explicit_predicates_ofMichael Goulet-35/+171
2023-04-30Rollup merge of #110631 - notriddle:notriddle/impl-trait-cycle, r=GuillaumeGomezMatthias Krüger-0/+52
rustdoc: catch and don't blow up on impl Trait cycles Fixes #110629 An odd feature of Rust is that `Foo` is invalid, but `Bar` is okay: type Foo<'a, 'b> = Box<dyn PartialEq<Foo<'a, 'b>>>; type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>>; To get it right, track every time rustdoc descends into a type alias, so if it shows up twice, it can be write the path instead of infinitely expanding it.
2023-04-29rustdoc: catch and don't blow up on impl Trait cyclesMichael Howell-0/+52
An odd feature of Rust is that `Foo` is invalid, but `Bar` is okay: type Foo<'a, 'b> = Box<dyn PartialEq<Foo<'a, 'b>>>; type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>>; To get it right, track every time rustdoc descends into a type alias, so if it shows up twice, it can be write the path instead of infinitely expanding it.
2023-04-30Rollup merge of #110981 - jyn514:rustdoc-tests, r=notriddleMatthias Krüger-29/+40
Move most rustdoc-ui tests into subdirectories This makes it easier to know where to add a new test, and makes the top-level directory less overwhelming.
2023-04-29move lint tests into subdirectoriesjyn-0/+0
2023-04-29Move some rustdoc-ui tests to subdirectoriesjyn-29/+40
2023-04-29Add `rustdoc::unescaped_backtick` lintLukas Markeffsky-0/+1301
2023-04-28Rollup merge of #110904 - fmease:rustdoc-fix-110900, r=compiler-errorsMatthias Krüger-0/+28
rustdoc: rebind bound vars to type-outlives predicates Fixes #110900.
2023-04-27rustdoc: rebind bound vars to type-outlives predicatesLeón Orell Valerian Liehr-0/+28
2023-04-27Rollup merge of #110816 - clubby789:rustc-passes-diagnostics, r=compiler-errorsMatthias Krüger-3/+3
Migrate `rustc_passes` to translatable diagnostics cc #100717
2023-04-26Migrate `rustc_passes` to translatable diagnosticsclubby789-3/+3
2023-04-26Rollup merge of #110329 - aDotInTheVoid:json-inline-again, r=jyn514jyn-11/+0
Improve tests for #110138 These should live in rustdoc-json, not rustdoc-ui, so we can run assertions, and not just check there's no ICE CC #100515, as we never document this suite r? rustdoc
2023-04-21Rollup merge of #110501 - notriddle:notriddle/ice-110495, r=petrochenkovDylan DPC-0/+60
rustdoc: fix ICE from rustc_resolve and librustdoc parse divergence Fixes #110495
2023-04-18rustdoc: fix ICE from rustc_resolve and librustdoc parse divergenceMichael Howell-0/+60
2023-04-18Add a failing rustdoc-ui test for public infinite recursive typeGuillaume Gomez-0/+9
2023-04-18Rollup merge of #110450 - GuillaumeGomez:fix-nested-items-on-private-doc, ↵Matthias Krüger-17/+4
r=notriddle,jyn514 rustdoc: Fix invalid handling of nested items with `--document-private-items` Fixes #110422. The problem is that only impl block and re-exported `macro_rules!` items are "visible" as nested items. This PR adds the missing checks to handle this correctly. cc `@compiler-errors` r? `@notriddle`
2023-04-17Add regression tests for #110422Guillaume Gomez-17/+4
2023-04-14Move test from rustdoc-ui to rustdoc-jsonAlona Enraght-Moony-11/+0
2023-04-14Rollup merge of #103682 - Swatinem:stable-run-directory, r=GuillaumeGomezYuki Okushi-2/+2
Stabilize rustdoc `--test-run-directory` This should resolve https://github.com/rust-lang/rust/issues/84674
2023-04-12Rollup merge of #109810 - jyn514:rustdoc-opt-tests, r=TaKO8KiMatthias Krüger-283/+0
Replace rustdoc-ui/{c,z}-help tests with a stable run-make test This make rustdoc resilient to changes in the debugging options while still testing that it matches rustc. Fixes https://github.com/rust-lang/rust/issues/109391.
2023-04-12Replace rustdoc-ui/{c,z}-help tests with a run-make testJynn Nelson-283/+0
This make rustdoc resilient to changes in the debugging options while still testing that it matches rustc.
2023-04-10fix(doc): do not parse inline when output is json for external cratebohan-0/+11
2023-04-05Bless rustdoc-ui test with new errors orderRémy Rakic-15/+15
The order in which the multiple errors for the ambiguous intra doc links are printed is different.
2023-04-04Auto merge of #109808 - jyn514:debuginfo-options, r=michaelwoeristerbors-1/+1
Extend -Cdebuginfo with new options and named aliases This is a rebase of https://github.com/rust-lang/rust/pull/83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below. Note that the changes in this PR have already been through FCP: https://github.com/rust-lang/rust/pull/83947#issuecomment-878384979 Closes https://github.com/rust-lang/rust/pull/109311. Helps with https://github.com/rust-lang/rust/pull/104968. r? `@michaelwoerister` cc `@cuviper` --- The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options. Fix https://github.com/rust-lang/rust/issues/60020 Fix https://github.com/rust-lang/rust/issues/64405
2023-03-31Rollup merge of #109443 - GuillaumeGomez:doc-primitive-hard-error, r=notriddleGuillaume Gomez-1/+2
Move `doc(primitive)` future incompat warning to `invalid_doc_attributes` Fixes #88070. It's been a while since this was turned into a "future incompatible lint" so I think we can now turn it into a hard error without problem. r? `@jyn514`
2023-03-31Rollup merge of #109104 - ↵Guillaume Gomez-47/+460
GuillaumeGomez:fix-invalid-suggestion-ambiguous-intra-doc2, r=oli-obk,notriddle rustdoc: Fix invalid suggestions on ambiguous intra doc links v2 Fixes https://github.com/rust-lang/rust/issues/108653. This is another approach to fixing the same issue. This time, we keep the computed information around instead of re-computing it. Strangely enough, the order for ambiguities seem to have been changed. Not an issue but it creates a lot of diff... So which version do you prefer? r? `@notriddle`
2023-03-31Stabilize rustdoc `--test-run-directory`Arpad Borsos-2/+2
2023-03-31Preserve, clarify, and extend debug informationJulia Tatz-1/+1
`-Cdebuginfo=1` was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for line tables only was added. Additionally an option for line info directives only was added, which is well needed for some targets. The debug info options should now behave the same as clang's debug info options.
2023-03-30Update tests for rustc_doc_primitiveGuillaume Gomez-1/+2
2023-03-30rustdoc: tidy excess whitespacePatrik Kårlin-4/+4
2023-03-30rustdoc: add error messages to the testPatrik Kårlin-60/+74
2023-03-30rustdoc: remove other redundant itemPatrik Kårlin-11/+0
2023-03-30rustdoc: remove excess from rustdoc testPatrik Kårlin-6/+2
2023-03-30rustdoc: remove redundant testPatrik Kårlin-13/+0
2023-03-30rustdoc: update with --bless and change expected errorsPatrik Kårlin-30/+352
2023-03-30rustdoc: run more HIR validation to mirror rustcPatrik Kårlin-0/+143
2023-03-27Rollup merge of #109330 - ↵Guillaume Gomez-0/+14
GuillaumeGomez:intermediate-reexport-intra-doc-ice, r=petrochenkov rustdoc: Fix ICE for intra-doc link on intermediate re-export Fixes https://github.com/rust-lang/rust/issues/109282. This PR is based on #109266 as it includes its commit to make this work. `@petrochenkov:` It was exactly as you predicted, adding the `DefId` to the attributes fixed the error for intermediate re-exports as well. Thanks a lot! r? `@petrochenkov`
2023-03-24Auto merge of #107932 - petrochenkov:onlyexport, r=jyn514bors-0/+13
rustdoc: Skip doc link resolution for non-exported items
2023-03-24Put back `is_derive_trait_collision` checkGuillaume Gomez-0/+22
2023-03-24Update UI tests for primitive type ambiguity error renamingGuillaume Gomez-25/+25
2023-03-24Add regression tests for #108653Guillaume Gomez-25/+416
2023-03-23Rollup merge of #107718 - Zoxc:z-time, r=nnethercoteMatthias Krüger-0/+1
Add `-Z time-passes-format` to allow specifying a JSON output for `-Z time-passes` This adds back the `-Z time` option as that is useful for [my rustc benchmark tool](https://github.com/Zoxc/rcb), reverting https://github.com/rust-lang/rust/pull/102725. It now uses nanoseconds and bytes as the units so it is renamed to `time-precise`.
2023-03-23rustdoc: Skip doc link resolution for non-exported itemsVadim Petrochenkov-0/+13
2023-03-23Add regression test for #109282Guillaume Gomez-0/+14
2023-03-21Add `-Z time-passes-format` to allow specifying a JSON output for `-Z ↵John Kåre Alsaker-0/+1
time-passes`
2023-03-21rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov-0/+11
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
2023-03-17rustdoc: Correctly merge import's and its target's docs in one more caseVadim Petrochenkov-0/+16