| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
use MCVE
|
|
|
|
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
|
|
diagnostics: remove trailing spaces
Remove few occurrences of trailing spaces and drive by fix of needless alloc of const string.
|
|
|
|
Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
|
|
Add test case.
|
|
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``
|
|
|
|
|
|
fix ci error
|
|
|
|
|
|
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``
|
|
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.
|
|
|
|
This way links referring to `macro_rules` items are resolved correctly
|
|
|
|
|
|
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
|
|
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.
|
|
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
r=notriddle
Fix panic when handling intra doc links generated from macro
Fixes #78591.
Fixes #92789.
r? ``@notriddle``
|
|
from a macro
|
|
Add test for #79465 to prevent regression
Fixes #79465.
Like this we will be able to close the issue.
r? ````@matthiaskrgr````
|
|
|
|
|
|
Similar to #86451
CC #67799
|
|
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`
|
|
Fix horizontal trim for block doc comments
Fixes #93662.
r? `@notriddle`
|
|
r=CraftSpider
rustdoc: correct unclosed HTML tags as generics
CC https://github.com/rust-lang/rust/issues/67799
|
|
|
|
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`.
|
|
Another one of those "good grief, I just submitted it and NOW I think of it" moments.
|
|
|
|
|
|
This allows simplifying a lot of code. It also fixes a subtle bug,
exemplified by the test output changes.
|