about summary refs log tree commit diff
path: root/tests/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
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-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
2023-03-16Bless -Zhelp output test.Mara Bos-0/+1
2023-03-10rustdoc: Don't crash on `crate` references in blocksAdrian Heine-0/+5
This is a regression from #94857.
2023-03-01Add unstable option new_rpitit to be used for new RPITIT lowering systemSantiago Pastorino-0/+1
2023-02-26Auto merge of #108473 - matthiaskrgr:rollup-qjyae58, r=matthiaskrgrbors-0/+21
Rollup of 8 pull requests Successful merges: - #107062 (Do some cleanup of doc/index.md) - #107890 (Lint against `Iterator::map` receiving a callable that returns `()`) - #108431 (Add regression test for #107918) - #108432 (test: drop unused deps) - #108436 (make "proc macro panicked" translatable) - #108444 (docs/test: add UI test and docs for `E0476`) - #108449 (Do not lint ineffective unstable trait impl for unresolved trait) - #108456 (Complete migrating `ast_passes` to derive diagnostics) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-26Rollup merge of #108431 - GuillaumeGomez:regression-test-for-107918, r=notriddleMatthias Krüger-0/+21
Add regression test for #107918 Fixes https://github.com/rust-lang/rust/issues/107918. r? ```@notriddle```
2023-02-25Rollup merge of #107675 - jsgf:link-directives, r=davidtwcoMichael Goulet-0/+1
Implement -Zlink-directives=yes/no `-Zlink-directives=no` will ignored `#[link]` directives while compiling a crate, so nothing is emitted into the crate's metadata. The assumption is that the build system already knows about the crate's native dependencies and can provide them at link time without these directives. This is another way to address issue # #70093, which is currently addressed by `-Zlink-native-libraries` (implemented in #70095). The latter is implemented at link time, which has the effect of ignoring `#[link]` in *every* crate. This makes it a very large hammer as it requires all native dependencies to be known to the build system to be at all usable, including those in sysroot libraries. I think this means its effectively unused, and definitely under-used. Being able to control this on a crate-by-crate basis should make it much easier to apply when needed. I'm not sure if we need both mechanisms, but we can decide that later. cc `@pcwalton` `@cramertj`
2023-02-25Rollup merge of #107291 - oli-obk:rustdoc_breaking_change, r=estebankMichael Goulet-0/+20
[breaking change] Remove a rustdoc back compat warning This warning was introduced in https://github.com/rust-lang/rust/pull/62855 for users who use `rustdoc` directly on proc macro crates (instead of using `cargo doc`) without passing `--crate-type proc-macro` (which `cargo doc` passed automatically).
2023-02-25Don't run issue-107918.rs test on windowsGuillaume Gomez-0/+1
2023-02-24Add regression test for #107918Guillaume Gomez-0/+20
2023-02-23rustdoc: update UI test for dropping "this" articleMichael Howell-1/+1
2023-02-23Test rustdoc encountering `proc_macro_derive` in a non-proc-macro crateOli Scherer-0/+20
2023-02-22link-directives: clarify usage messageJeremy Fitzhardinge-1/+1
2023-02-22Implement -Zlink-directives=yes/noJeremy Fitzhardinge-0/+1
`-Zlink-directives=no` will ignored `#[link]` directives while compiling a crate, so nothing is emitted into the crate's metadata. The assumption is that the build system already knows about the crate's native dependencies and can provide them at link time without these directives. This is another way to address issue # #70093, which is currently addressed by `-Zlink-native-libraries` (implemented in #70095). The latter is implemented at link time, which has the effect of ignoring `#[link]` in *every* crate. This makes it a very large hammer as it requires all native dependencies to be known to the build system to be at all usable, including those in sysroot libraries. I think this means its effectively unused, and definitely under-used. Being able to control this on a crate-by-crate basis should make it much easier to apply when needed. I'm not sure if we need both mechanisms, but we can decide that later.
2023-02-21Rollup merge of #108285 - BoxyUwU:remove_pick_stable_before_unstable_flag, ↵Dylan DPC-177/+176
r=oli-obk remove unstable `pick_stable_methods_before_any_unstable` flag This flag was only added in #90329 in case there was any issue with the impl so that it would be easy to tell nightly users to use the flag to disable the new logic to fix their code. It's now been enabled for two years and also I can't find any issues corresponding to this new functionality? This flag made it way harder to understand how this code works so it would be nice to remove it and simplify what's going on. cc `@nbdd0121` r? `@oli-obk`
2023-02-20remove flagBoxy-177/+176
2023-02-20Make `configure_and_expand` "infalllible" by just aborting the compilation ↵Oli Scherer-22/+20
if it fails instead of bubbling out an error
2023-02-19Only include stable lints in `rustdoc::all` groupNoah Lev-19/+40
Including unstable lints in the lint group produces unintuitive behavior on stable (see #106289). Meanwhile, if we only included unstable lints on nightly and not on stable, we could end up with confusing bugs that were hard to compare across versions of Rust that lacked code changes. I think that only including stable lints in `rustdoc::all`, no matter the release channel, is the most intuitive option. Users can then control unstable lints individually, which is reasonable since they have to enable the feature gates individually anyway.
2023-02-19Rollup merge of #107951 - petrochenkov:procmacdoc, r=jackh726Dylan DPC-0/+27
resolve: Fix doc links referring to other crates when documenting proc macro crates directly Fixes https://github.com/rust-lang/rust/issues/107950
2023-02-18rustdoc: Cleanup broken link callbacksVadim Petrochenkov-16/+16
2023-02-16Remove save-analysis.Nicholas Nethercote-1/+0
Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. For `x.py install`, the `rust-analysis` target has been removed. For `x.py dist`, the `rust-analysis` target has been kept in a degenerate form: it just produces a single file `reduced.json` indicating that save-analysis has been removed. This is necessary for rustup to keep working. Closes #43606.
2023-02-14Fetch less HIR in signature check.Camille GILLOT-377/+6
2023-02-13Rollup merge of #107838 - estebank:terminal_hyperlinks, r=nagisaMatthias Krüger-0/+1
Introduce `-Zterminal-urls` to use OSC8 for error codes Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-13resolve: Fix doc links referring to other crates when documenting proc macro ↵Vadim Petrochenkov-0/+27
crates directly
2023-02-11rustdoc: Don't resolve link to field on different variantclubby789-1/+29
2023-02-10Auto merge of #102963 - ilammy:xray-basic, r=estebankbors-0/+9
Add `-Z instrument-xray` flag Implement MCP https://github.com/rust-lang/compiler-team/issues/561, adding `-Z instrument-xray` flag which enables XRay instrumentation in LLVM.
2023-02-09Introduce `-Zterminal-urls` to use OSC8 for error codesEsteban Küber-0/+1
Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-09Parse "-Z instrument-xray" codegen optionOleksii Lozovskyi-0/+9
Recognize all bells and whistles that LLVM's XRay pass is capable of. The always/never settings are a bit dumb without attributes but they're still there. The default instruction count is chosen by the compiler, not LLVM pass. We'll do it later.
2023-02-07Replace a command line flag with an env var to allow tools to initialize the ↵Oli Scherer-1/+0
tracing loggers at their own discretion
2023-02-02Auto merge of #107000 - GuillaumeGomez:fix-items-in-doc-hidden-block, ↵bors-7/+34
r=notriddle,petrochenkov Fix handling of items inside a `doc(hidden)` block Fixes #106373. cc `@aDotInTheVoid` r? `@notriddle`