about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/rustdoc.rs
AgeCommit message (Collapse)AuthorLines
2025-03-27rustc_resolve: prevent iteration of refids for completenessAugie Fackler-2/+3
This came up in review, and it should help some future author not introduce non-deterministic output here.
2025-03-18rustc_resolve: fix instability in lib.rmeta contentsAugie Fackler-1/+2
rust-lang/rust@23032f31c91f2 accidentally introduced some nondeterminism in the ordering of lib.rmeta files, which we caught in our bazel-based builds only recently due to being further behind than normal. In my testing, this fixes the issue.
2025-02-15rustdoc: improve refdef handling in the unresolved link lintMichael Howell-2/+16
This commit takes advantage of a feature in pulldown-cmark that makes the list of link definitions available to the consuming application. It produces unresolved link warnings for refdefs that aren't used, and can now produce exact spans for the dest even when it has escapes.
2025-01-19Run `clippy --fix` for `unnecessary_map_or` lintYotam Ofek-4/+1
2025-01-12Deny `clippy:;four_forward_slashes` and fix the only occurrenceJosh Triplett-1/+1
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-2/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-12-17Auto merge of #134376 - jdonszelmann:fix-rustdoc-perf, r=jieyouxubors-2/+3
Try to fix perf regression in rustdoc after hir attributes Slight performance regression introduced in #131808 r? `@jieyouxu`
2024-12-16split attributesJonathan Dönszelmann-1/+1
2024-12-16try fix hir-attrs perfJonathan Dönszelmann-2/+3
2024-12-15Add hir::AttributeJonathan Dönszelmann-20/+19
2024-12-15Rename `value` field to `expr` to simplify later commits' diffsOli Scherer-2/+2
2024-12-02Add a helper method for extracting spans from AttrArgsEqOli Scherer-2/+2
2024-12-02Change `AttrArgs::Eq` into a struct variantOli Scherer-1/+1
2024-10-06Handle `librustdoc` cases of `rustc::potential_query_instability` lintismailarilik-3/+3
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-2/+2
2024-09-11Also fix if in elseMichael Goulet-5/+3
2024-09-02chore: Fix typos in 'compiler' (batch 2)Alexander Cyon-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-19Avoid ref when using format! in compilerYuri Astrakhan-1/+1
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse.
2024-06-30rustdoc: update to pulldown-cmark 0.11Michael Howell-5/+9
2024-05-10Remove `#[macro_use] extern crate tracing` from `rustc_resolve`.Nicholas Nethercote-0/+1
Explicit imports are more standard nowadays and easier to read.
2024-04-28Fix the assertion crash from rustdoc document indent widthsyukang-11/+14
2024-03-29rustdoc: point at span in `include_str!`-ed md fileMichael Howell-7/+38
2024-03-15less symbols interner locksklensy-3/+4
2023-12-15NFC don't convert types to identical typesMatthias Krüger-2/+1
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-10-13Format all the let chains in compilerMichael Goulet-1/+3
2023-09-08Reuse rustdoc's doc comment handling in ClippyAlex Macleod-1/+88
2023-08-18narrow down the lint trigger constraintKyle Lin-6/+13
2023-08-18fomar filesKyle Lin-1/+8
2023-08-18Still resolving rustdoc resolution panickingKyle Lin-2/+4
2023-08-18Fix resolution cachingKyle Lin-8/+49
2023-04-18rustdoc: fix ICE from rustc_resolve and librustdoc parse divergenceMichael Howell-0/+1
2023-03-31Update doc(primitive) in rustc_resolveGuillaume Gomez-3/+5
2023-03-23rustdoc: Skip doc link resolution for non-exported itemsVadim Petrochenkov-1/+15
2023-03-21rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov-8/+10
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
2023-02-22rustdoc: reduce allocations when generating tooltipsMichael Howell-6/+10
An attempt to reduce the perf regression in https://github.com/rust-lang/rust/pull/108052#issuecomment-1430631861
2023-02-19Rollup merge of #108129 - ↵Guillaume Gomez-0/+1
GuillaumeGomez:correctly-handle-links-starting-with-whitespace, r=petrochenkov Correctly handle links starting with whitespace Part of https://github.com/rust-lang/rust/issues/107995. I just got this issue, wrote a fix and then saw the issue. So here's the PR. ^^' r? `@petrochenkov`
2023-02-18Correctly handle if a link starts with a whitespaceGuillaume Gomez-0/+1
2023-02-18doc links: Filter away autolinks in both rustc and rustdocVadim Petrochenkov-2/+19
2023-02-18rustdoc: Cleanup broken link callbacksVadim Petrochenkov-13/+10
2023-02-15use chars instead of strings where applicableMatthias Krüger-1/+1
2023-02-10Stop resolving doc links on `mod` items twiceVadim Petrochenkov-0/+8
2023-02-10Resolve documentation links in rustc and store the results in metadataVadim Petrochenkov-0/+361
This commit implements MCP https://github.com/rust-lang/compiler-team/issues/584 It also removes code that is no longer used, and that includes code cloning resolver, so issue #83761 is fixed.