about summary refs log tree commit diff
path: root/src/test/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
2022-07-20Rollup merge of #99436 - Nilstrieb:toggle-box-noalias, r=fee1-deadDylan DPC-0/+1
Add flag to configure `noalias` on `Box<T>` The aliasing rules of `Box<T>` are still not decided, but currently, `Box<T>` is unique and gets `noalias`. To aid making an informed decision about the future of `Box<T>`, this PR adds a flag `-Zbox-noalias` to configure `noalias` for `Box<T>` (for example, for benchmarking). The same flag already exists for `&mut T` `noalias`, where it was added because it was the problem of various miscompilations in LLVM. For more information, see rust-lang/unsafe-code-guidelines#326
2022-07-19Add flag to configure `noalias` on `Box<T>`nils-0/+1
To aid making an informed decision about the aliasing rules of box, give users an option to remove `noalias` from box.
2022-07-17rustdoc: extend `#[doc(tuple_variadic)]` to fn pointersMichael Howell-5/+5
The attribute is also renamed `fake_variadic`.
2022-07-15passes: migrate half of `check_attr`David Wood-5/+5
Migrate half of the `rustc_passes::check_attr` diagnostics to using diagnostic derives and being translatable.
2022-07-12Update -zhelp and -chelp rustdoc-ui tests to use regex-error-patternGuillaume Gomez-0/+4
2022-07-11Rollup merge of #99142 - ↵Matthias Krüger-0/+16
notriddle:notriddle/doctest-multiline-crate-attributes, r=GuillaumeGomez fix(doctest): treat fatal parse errors as incomplete attributes Fixes #99089
2022-07-11Add tests for -Chelp and -ZhelpGuillaume Gomez-0/+254
2022-07-10fix(doctest): treat fatal parse errors as incomplete attributesMichael Howell-0/+16
Fixes #99089
2022-07-08Rollup merge of #95635 - davidtwco:terminal-width-stabilization, r=oli-obkMatthias Krüger-0/+20
sess: stabilize `--terminal-width` as `--diagnostic-width` Formerly `-Zterminal-width`, `--terminal-width` allows the user or build tool to inform rustc of the width of the terminal so that diagnostics can be truncated. Pending agreement to stabilize, see tracking issue at #84673. r? ```@oli-obk```
2022-07-06session: `output-width` -> `diagnostic-width`David Wood-3/+3
Rename the `--output-width` flag to `--diagnostic-width` as this appears to be the preferred name within the compiler team. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-06session: `terminal-width` -> `output-width`David Wood-3/+3
Rename the `--terminal-width` flag to `--output-width` as the behaviour doesn't just apply to terminals (and so is slightly less accurate). Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-06sess: stabilize `--terminal-width`David Wood-0/+20
Formerly `-Zterminal-width`, `--terminal-width` allows the user or build tool to inform rustc of the width of the terminal so that diagnostics can be truncated. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-06replace `guess_head_span` with `def_span`Takayuki Maeda-1/+1
2022-07-04add regression test for #79467Takayuki Maeda-0/+17
2022-07-03Rollup merge of #98799 - jyn514:rustdoc-lint-help, r=GuillaumeGomezRalf Jung-193/+26
Fix bug in `rustdoc -Whelp` Previously, this printed the debugging options, not the lint options, and only handled `-Whelp`, not `-A/-D/-F`. This also fixes a few other misc issues: - Fix `// check-stdout` for UI tests; previously it only worked for run-fail and compile-fail tests - Add lint headers for tool lints, not just builtin lints https://github.com/rust-lang/rust/pull/98533#issuecomment-1172004197 r? ```@GuillaumeGomez```
2022-07-02Fix bug in `rustdoc -Whelp`Joshua Nelson-193/+26
Previously, this printed the debugging options, not the lint options, and only handled `-Whelp`, not `-A/-D/-F`. This also fixes a few other misc issues: - Fix `// check-stdout` for UI tests; previously it only worked for run-fail and compile-fail tests - Add lint headers for tool lints, not just builtin lints - Remove duplicate run-make test
2022-07-02Rollup merge of #98653 - TaKO8Ki:add-regression-test-for-79494, ↵Dylan DPC-0/+17
r=Mark-Simulacrum Add regression test for #79494 closes #79494
2022-07-01Auto merge of #98781 - GuillaumeGomez:rollup-798kb8u, r=GuillaumeGomezbors-0/+11
Rollup of 5 pull requests Successful merges: - #97249 (`<details>`/`<summary>` UI fixes) - #98418 (Allow macOS to build LLVM as shared library) - #98460 (Use CSS variables to handle theming) - #98497 (Improve some inference diagnostics) - #98708 (rustdoc: fix 98690 Panic if invalid path for -Z persist-doctests) Failed merges: - #98761 (more `need_type_info` improvements) r? `@ghost` `@rustbot` modify labels: rollup
2022-07-01Shorten def_span for more items.Camille GILLOT-3/+2
2022-07-01rustdoc: fix 98690pinkforest-0/+11
2022-06-30add regression test for #79494Takayuki Maeda-0/+17
use MCVE
2022-06-27Finish rustdoc error improvementGuillaume Gomez-24/+192
2022-06-19collapse dead code warnings into a single diagnosticTakayuki Maeda-1/+1
add comments in `store_dead_field_or_variant` support multiple log level add a item ident label fix ui tests fix a ui test fix a rustdoc ui test use let chain refactor: remove `store_dead_field_or_variant` fix a tiny bug
2022-06-17Auto merge of #97892 - klensy:fix-spaces, r=oli-obkbors-8/+8
diagnostics: remove trailing spaces Remove few occurrences of trailing spaces and drive by fix of needless alloc of const string.
2022-06-16bless rustdoc-ui testsklensy-8/+8
2022-06-13rustdoc: add missing articleMichael Howell-1/+1
Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
2022-06-12rustdoc: change error message for invalid `#[doc(tuple_variadic)]`Michael Howell-0/+23
Add test case.
2022-06-01Rollup merge of #97264 - ↵Matthias Krüger-0/+4
TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate, r=estebank Suggest `extern crate foo` when failing to resolve `use foo` closes #97095 r? ``@estebank``
2022-05-26Remove few characters for tidy check to passhafeoz-1/+1
2022-05-26Add testshafeoz-0/+17
2022-05-25suggest `extern crate foo` when failing to resolve `use foo`Takayuki Maeda-0/+4
fix ci error
2022-05-15rustdoc: Remove doc link resolution fallback to all `macro_rules` in the crateVadim Petrochenkov-17/+17
2022-05-08Support `#[expect]` attributes for rustdoc lints (RFC 2383)xFrednet-0/+185
2022-05-04Rollup merge of #96668 - GuillaumeGomez:fix-rustdoc-ui-flaky-test, ↵Yuki Okushi-1/+2
r=petrochenkov Fix flaky rustdoc-ui test because it did not replace time result As mentioned in https://github.com/rust-lang/rust/pull/93715: a test is flaky because I forgot to replace the time value. This PR fixes it. r? ``@petrochenkov``
2022-05-04Auto merge of #96447 - petrochenkov:docregr, r=GuillaumeGomezbors-0/+44
rustdoc: Resolve doc links on fields during early resolution Another subset of https://github.com/rust-lang/rust/pull/94857 which fixes https://github.com/rust-lang/rust/issues/96429. This case regressed in https://github.com/rust-lang/rust/pull/96135 when `may_have_doc_links`-based filtering was introduced. Before that filtering structs could collect traits in scope for their fields, but after the filtering structs won't collect anything if they don't have doc comments on them, so we have to visit fields too.
2022-05-03Fix flaky rustdoc-ui test because it did not replace time resultGuillaume Gomez-1/+2
2022-05-01rustdoc: Track `macro_rules` scopes during early doc link resolutionVadim Petrochenkov-0/+64
This way links referring to `macro_rules` items are resolved correctly
2022-04-26rustdoc: Resolve doc links on fields during early resolutionVadim Petrochenkov-0/+44
2022-04-21rustdoc: Unindent doc fragments on `Attributes` constructionVadim Petrochenkov-2/+0
2022-04-19rustc_metadata: Store a flag telling whether an item may have doc links in ↵Vadim Petrochenkov-17/+1
its attributes This should be cheap on rustc side, but it's significant optimization for rustdoc that won't need to decode and process attributes unnecessarily
2022-04-16Rollup merge of #95887 - petrochenkov:doclink5, r=cjgillotDylan DPC-0/+17
resolve: Create dummy bindings for all unresolved imports Apparently such bindings weren't previously created for all unresolved imports, causing issues like https://github.com/rust-lang/rust/issues/95879. In this PR I'm trying to create such dummy bindings in a more centralized way by calling `import_dummy_binding` once for all imports in `finalize_imports`. Fixes https://github.com/rust-lang/rust/issues/95879.
2022-04-12Update src/test/rustdoc-ui/failed-doctest-output-windows.rsMichael Howell-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-04-11Fix line numbersMichael Howell-15/+15
2022-04-10Fix test case for windowsMichael Howell-0/+70
2022-04-10resolve: Create dummy bindings for all unresolved importsVadim Petrochenkov-0/+17
2022-04-07Fix test caseMichael Howell-1/+1
2022-04-07rustdoc: Early doc link resolution fixes and refactoringsVadim Petrochenkov-0/+30
2022-04-05resolve: Fix resolution of empty paths passed from rustdocVadim Petrochenkov-0/+18
2022-04-05Auto merge of #95337 - petrochenkov:doclink3, r=camelidbors-0/+19
rustdoc: Fix resolution of `crate`-relative paths in doc links Resolve `crate::foo` paths transparently to rustdoc, so their resolution no longer affects diagnostics and modules used for determining traits in scope. The proper solution is to account for the current `module_id`/`parent_scope` in `fn resolve_crate_root`, but it's a slightly larger compiler changes. This PR moves the code closer to it, but keeps it rustdoc-specific. Fixes https://github.com/rust-lang/rust/issues/78696 Fixes https://github.com/rust-lang/rust/issues/94924
2022-04-02Add test for multi-line attribute handling in doctestsGuillaume Gomez-0/+18