about summary refs log tree commit diff
path: root/src/test/rustdoc-ui
AgeCommit message (Collapse)AuthorLines
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
2022-03-31rustdoc: Fix resolution of `crate`-relative paths in doc linksVadim Petrochenkov-0/+19
2022-03-25Bless rustdoc tests.Camille GILLOT-30/+0
2022-03-15fix typosDylan DPC-1/+1
2022-03-02Rollup merge of #94478 - GuillaumeGomez:macro-generated-intra-doc-link, ↵Matthias Krüger-0/+33
r=notriddle Fix panic when handling intra doc links generated from macro Fixes #78591. Fixes #92789. r? ``@notriddle``
2022-03-01Add test to ensure it does not panic when an intra-doc link is generated ↵Guillaume Gomez-0/+33
from a macro
2022-02-27Rollup merge of #94399 - GuillaumeGomez:regression-test-79465, r=matthiaskrgrMatthias Krüger-0/+18
Add test for #79465 to prevent regression Fixes #79465. Like this we will be able to close the issue. r? ````@matthiaskrgr````
2022-02-26Add test for #79465 to prevent regressionGuillaume Gomez-0/+18
2022-02-25Wire up --check-cfg to rustdocLoïc BRANSTETT-0/+50
2022-02-16rustdoc: resolve intra-doc links when checking HTMLMichael Howell-0/+94
Similar to #86451 CC #67799
2022-02-08Rollup merge of #93721 - jyn514:less-macro-special-casing, r=petrochenkovMatthias Krüger-0/+9
rustdoc: Special-case macro lookups less Previously, rustdoc had 3 fallbacks it used: 1. `resolve_macro_path` 2. `all_macros` 3. `resolve_str_path_error` Ideally, it would only use `resolve_str_path_error`, to be consistent with other namespaces. Unfortunately, that doesn't consider macros that aren't defined at module scope; consider for instance ```rust { struct S; macro_rules! mac { () => {} } // `mac`'s scope starts here /// `mac` <- `resolve_str_path_error` won't see this struct Z; //`mac`'s scope ends here } ``` This changes it to only use `all_macros` and `resolve_str_path_error`, and gives `resolve_str_path_error` precedence over `all_macros` in case there are two macros with the same name in the same module. This is a smaller version of https://github.com/rust-lang/rust/pull/91427. r? `@petrochenkov`
2022-02-08Rollup merge of #93715 - GuillaumeGomez:horizontal-trim, r=notriddleMatthias Krüger-0/+21
Fix horizontal trim for block doc comments Fixes #93662. r? `@notriddle`
2022-02-08Rollup merge of #93569 - notriddle:notriddle/rustdoc-html-tags-generics, ↵Matthias Krüger-0/+213
r=CraftSpider rustdoc: correct unclosed HTML tags as generics CC https://github.com/rust-lang/rust/issues/67799
2022-02-07Add test for block doc comments horizontal trimGuillaume Gomez-0/+21
2022-02-06rustdoc: Special-case macro lookups lessJoshua Nelson-0/+9
Previously, rustdoc had 3 fallbacks it used: 1. `resolve_macro_path` 2. `all_macros` 3. `resolve_str_path_error` Ideally, it would only use `resolve_str_path_error`, to be consistent with other namespaces. Unfortunately, that doesn't consider macros that aren't defined at module scope; consider for instance ```rust { struct S; macro_rules! mac { () => {} } // `mac`'s scope starts here /// `mac` <- `resolve_str_path_error` won't see this struct Z; //`mac`'s scope ends here } ``` This changes it to only use `all_macros` and `resolve_str_path_error`, and gives `resolve_str_path_error` precedence over `all_macros` in case there are two macros with the same name in the same module. This also adds a failing test case which will catch trying to remove `all_macros`.
2022-02-01Use multipart suggestion for code wrappingMichael Howell-35/+40
Another one of those "good grief, I just submitted it and NOW I think of it" moments.
2022-02-01rustdoc: correct unclosed HTML tags as genericsMichael Howell-0/+208
2022-01-28remove allow_fail test flagyuhaixin.hx-111/+16
2022-01-10Use Res instead of Disambiguator for `resolved` in `report_mismatch`Noah Lev-2/+2
This allows simplifying a lot of code. It also fixes a subtle bug, exemplified by the test output changes.