summaryrefslogtreecommitdiff
path: root/tests/rustdoc-ui
Commit message (Collapse)AuthorAgeFilesLines
* Fix backtrace normalization in ice-bug-report-url.rsUlrich Weigand2023-05-112-2/+3
| | | | | | | | | | | | | | | | | | | | This test case currently fails on s390x, and probably other platforms where the last line of a backtrace does not contain and " at <source location>" specification. The problem with the existing normalization lines // normalize-stderr-test "\s*\d{1,}: .*\n" -> "" // normalize-stderr-test "\s at .*\n" -> "" is that \s matches all whitespace, including newlines, so the first (but not second) of these regexes may merge multiple lines. Thus the output differs depending on which of these matches on the last line of a backtrace. As the whitespace used in backtraces is just normal space characters, change both regexes to just match at least one space character instead: // normalize-stderr-test " +\d{1,}: .*\n" -> "" // normalize-stderr-test " + at .*\n" -> ""
* Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkinMatthias Krüger2023-05-062-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.
| * Make the BUG_REPORT_URL configurable by toolsjyn2023-05-012-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
* | Improve check-cfg diagnostics (part 1)Urgau2023-05-052-2/+2
| |
* | Don't use implied trait predicates in gather_explicit_predicates_ofMichael Goulet2023-05-012-35/+171
| |
* | Rollup merge of #110631 - notriddle:notriddle/impl-trait-cycle, r=GuillaumeGomezMatthias Krüger2023-04-303-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.
| * | rustdoc: catch and don't blow up on impl Trait cyclesMichael Howell2023-04-293-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.
* | | Rollup merge of #110981 - jyn514:rustdoc-tests, r=notriddleMatthias Krüger2023-04-30198-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.
| * | move lint tests into subdirectoriesjyn2023-04-2953-0/+0
| | |
| * | Move some rustdoc-ui tests to subdirectoriesjyn2023-04-29145-29/+40
| |/
* | Add `rustdoc::unescaped_backtick` lintLukas Markeffsky2023-04-292-0/+1301
|/
* Rollup merge of #110904 - fmease:rustdoc-fix-110900, r=compiler-errorsMatthias Krüger2023-04-281-0/+28
|\ | | | | | | | | | | rustdoc: rebind bound vars to type-outlives predicates Fixes #110900.
| * rustdoc: rebind bound vars to type-outlives predicatesLeón Orell Valerian Liehr2023-04-271-0/+28
| |
* | Rollup merge of #110816 - clubby789:rustc-passes-diagnostics, r=compiler-errorsMatthias Krüger2023-04-273-3/+3
|\ \ | | | | | | | | | | | | | | | Migrate `rustc_passes` to translatable diagnostics cc #100717
| * | Migrate `rustc_passes` to translatable diagnosticsclubby7892023-04-263-3/+3
| | |
* | | Rollup merge of #110329 - aDotInTheVoid:json-inline-again, r=jyn514jyn2023-04-262-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
| * | Move test from rustdoc-ui to rustdoc-jsonAlona Enraght-Moony2023-04-142-11/+0
| | |
* | | Rollup merge of #110501 - notriddle:notriddle/ice-110495, r=petrochenkovDylan DPC2023-04-212-0/+60
|\ \ \ | | | | | | | | | | | | | | | | | | | | rustdoc: fix ICE from rustc_resolve and librustdoc parse divergence Fixes #110495
| * | | rustdoc: fix ICE from rustc_resolve and librustdoc parse divergenceMichael Howell2023-04-182-0/+60
| | |/ | |/|
* | | Add a failing rustdoc-ui test for public infinite recursive typeGuillaume Gomez2023-04-184-0/+9
|/ /
* | Rollup merge of #110450 - GuillaumeGomez:fix-nested-items-on-private-doc, ↵Matthias Krüger2023-04-182-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`
| * | Add regression tests for #110422Guillaume Gomez2023-04-172-17/+4
| | |
* | | Rollup merge of #103682 - Swatinem:stable-run-directory, r=GuillaumeGomezYuki Okushi2023-04-141-2/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | Stabilize rustdoc `--test-run-directory` This should resolve https://github.com/rust-lang/rust/issues/84674
| * | Stabilize rustdoc `--test-run-directory`Arpad Borsos2023-03-311-2/+2
| | |
* | | Rollup merge of #109810 - jyn514:rustdoc-opt-tests, r=TaKO8KiMatthias Krüger2023-04-124-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.
| * | Replace rustdoc-ui/{c,z}-help tests with a run-make testJynn Nelson2023-04-124-283/+0
| | | | | | | | | | | | | | | This make rustdoc resilient to changes in the debugging options while still testing that it matches rustc.
* | | fix(doc): do not parse inline when output is json for external cratebohan2023-04-102-0/+11
|/ /
* | Bless rustdoc-ui test with new errors orderRémy Rakic2023-04-051-15/+15
| | | | | | | | | | The order in which the multiple errors for the ambiguous intra doc links are printed is different.
* | Auto merge of #109808 - jyn514:debuginfo-options, r=michaelwoeristerbors2023-04-041-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
| * | Preserve, clarify, and extend debug informationJulia Tatz2023-03-311-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.
* | | Rollup merge of #109443 - GuillaumeGomez:doc-primitive-hard-error, r=notriddleGuillaume Gomez2023-03-311-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`
| * | | Update tests for rustc_doc_primitiveGuillaume Gomez2023-03-301-1/+2
| |/ /
* | | Rollup merge of #109104 - ↵Guillaume Gomez2023-03-3125-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`
| * | Put back `is_derive_trait_collision` checkGuillaume Gomez2023-03-241-0/+22
| | |
| * | Update UI tests for primitive type ambiguity error renamingGuillaume Gomez2023-03-249-25/+25
| | |
| * | Add regression tests for #108653Guillaume Gomez2023-03-2418-25/+416
| | |
* | | rustdoc: tidy excess whitespacePatrik Kårlin2023-03-301-4/+4
| | |
* | | rustdoc: add error messages to the testPatrik Kårlin2023-03-302-60/+74
| | |
* | | rustdoc: remove other redundant itemPatrik Kårlin2023-03-302-11/+0
| | |
* | | rustdoc: remove excess from rustdoc testPatrik Kårlin2023-03-302-6/+2
| | |
* | | rustdoc: remove redundant testPatrik Kårlin2023-03-302-13/+0
| | |
* | | rustdoc: update with --bless and change expected errorsPatrik Kårlin2023-03-308-30/+352
| | |
* | | rustdoc: run more HIR validation to mirror rustcPatrik Kårlin2023-03-3014-0/+143
| |/ |/|
* | Rollup merge of #109330 - ↵Guillaume Gomez2023-03-271-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`
| * | Add regression test for #109282Guillaume Gomez2023-03-231-0/+14
| |/
* | Auto merge of #107932 - petrochenkov:onlyexport, r=jyn514bors2023-03-241-0/+13
|\ \ | | | | | | | | | rustdoc: Skip doc link resolution for non-exported items
| * | rustdoc: Skip doc link resolution for non-exported itemsVadim Petrochenkov2023-03-231-0/+13
| |/
* | Rollup merge of #107718 - Zoxc:z-time, r=nnethercoteMatthias Krüger2023-03-231-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`.
| * Add `-Z time-passes-format` to allow specifying a JSON output for `-Z ↵John Kåre Alsaker2023-03-211-0/+1
| | | | | | | | time-passes`
* | rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov2023-03-212-0/+11
|/ | | | | Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.