about summary refs log tree commit diff
path: root/tests/rustdoc
AgeCommit message (Collapse)AuthorLines
2025-06-26Change const trait bound syntax from ~const to [const]Oli Scherer-25/+25
2025-06-24rustdoc: Don't mark `#[target_feature]` functions as ⚠Alona Enraght-Moony-0/+38
Closes https://www.github.com/rust-lang/rust/issues/142952
2025-06-16rustdoc: `PointeeSized` bounds with extern typesDavid Wood-1/+1
As before, updating types using extern types to use `PointeeSized` bounds.
2025-06-16rustdoc: `{Meta,Pointee,}Sized` in non-minicoreDavid Wood-13/+77
Some rustdoc tests are `no_core` and need to have `MetaSized` and `PointeeSized` added to them.
2025-06-13Auto merge of #142443 - matthiaskrgr:rollup-l1l6d0v, r=matthiaskrgrbors-3/+3
Rollup of 9 pull requests Successful merges: - rust-lang/rust#128425 (Make `missing_fragment_specifier` an unconditional error) - rust-lang/rust#135927 (retpoline and retpoline-external-thunk flags (target modifiers) to enable retpoline-related target features) - rust-lang/rust#140770 (add `extern "custom"` functions) - rust-lang/rust#142176 (tests: Split dont-shuffle-bswaps along opt-levels and arches) - rust-lang/rust#142248 (Add supported asm types for LoongArch32) - rust-lang/rust#142267 (assert more in release in `rustc_ast_lowering`) - rust-lang/rust#142274 (Update the stdarch submodule) - rust-lang/rust#142276 (Update dependencies in `library/Cargo.lock`) - rust-lang/rust#142308 (Upgrade `object`, `addr2line`, and `unwinding` in the standard library) Failed merges: - rust-lang/rust#140920 (Extract some shared code from codegen backend target feature handling) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: test-various
2025-06-13Rollup merge of #141770 - GuillaumeGomez:cfg-false-mod-rendering, r=camelidMatthias Krüger-3/+7
Merge `Cfg::render_long_html` and `Cfg::render_long_plain` methods common code Follow-up of https://github.com/rust-lang/rust/pull/141747. Thanks `@camelid` for spotting it! r? `@camelid`
2025-06-12Fix a missing fragment specifier in rustdoc testsTrevor Gross-3/+3
2025-06-05Support middle::ty assoc const eq predicates againLeón Orell Valerian Liehr-1/+0
2025-06-03* Add test case for `cfg(false)` on module levelGuillaume Gomez-3/+7
* Fix typo * Remove usage of `!has`
2025-05-30Rollup merge of #141747 - lolbinarycat:rustdoc-cfg-138112, r=GuillaumeGomezMatthias Krüger-0/+13
rustdoc: display doc(cfg(false)) properly before we had an extra 'on' that was ungramatical. fixes https://github.com/rust-lang/rust/issues/138112 this is what it looks like now: ![screenshot: Available nowhere](https://github.com/user-attachments/assets/e27b4990-09a7-4f13-8bcf-26d44c8c1bea)
2025-05-29rustdoc: display doc(cfg(false)) properlybinarycat-0/+13
before we had an extra 'on' that was ungramatical. fixes https://github.com/rust-lang/rust/issues/138112
2025-05-28Rollup merge of #141411 - lolbinarycat:rustdoc-link-proc-macro-91274, ↵Trevor Gross-0/+13
r=GuillaumeGomez rustdoc: linking to a local proc macro no longer warns fixes https://github.com/rust-lang/rust/issues/91274 tried to keep the fix general in case we ever have any other kind of item that occupies multiple namespaces simultaniously.
2025-05-27Rollup merge of #141517 - ↵Trevor Gross-0/+23
lolbinarycat:rustdoc-doctest-tooltip-ignore-141092, r=notriddle rustdoc: use descriptive tooltip if doctest is conditionally ignored fixes https://github.com/rust-lang/rust/issues/141092 here's what it looks like now: ![screenshot](https://github.com/user-attachments/assets/71e679fe-8828-439d-a2ce-b9187ad3aeea)
2025-05-27rustdoc: linking to a local proc macro no longer warnsbinarycat-0/+13
fixes https://github.com/rust-lang/rust/issues/91274 Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-05-25Add regression test for #140739Guillaume Gomez-0/+42
2025-05-25Tweak attribute rendering depending on wether or not it is a type aliasGuillaume Gomez-1/+1
2025-05-24rustdoc: use descriptive tooltip if doctest is conditionally ignoredbinarycat-0/+23
fixes https://github.com/rust-lang/rust/issues/141092
2025-05-05Created `tests/rustdoc/async` subfolder to limit number of files at the top ↵Guillaume Gomez-0/+0
level
2025-05-05Created `tests/rustdoc/extern` subfolder to limit number of files at the top ↵Guillaume Gomez-0/+6
level
2025-05-05Move primitive rustdoc tests into the `primitive` sub folderGuillaume Gomez-0/+0
2025-05-05Created `tests/rustdoc/enum` subfolder to limit number of files at the top levelGuillaume Gomez-0/+0
2025-05-05Created `tests/rustdoc/assoc` subfolder to limit number of files at the top ↵Guillaume Gomez-0/+0
level
2025-05-05Created `tests/rustdoc/impl` subfolder to limit number of files at the top levelGuillaume Gomez-0/+0
2025-05-05Created `tests/rustdoc/doc-cfg` subfolder to limit number of files at the ↵Guillaume Gomez-0/+0
top level
2025-05-05Created `tests/rustdoc/macro` subfolder to limit number of files at the top ↵Guillaume Gomez-0/+20
level
2025-05-05Created `tests/rustdoc/private` subfolder to limit number of files at the ↵Guillaume Gomez-0/+0
top level
2025-05-05Move intra-doc tests into the expected subfolderGuillaume Gomez-0/+0
2025-05-05Created `tests/rustdoc/jump-to-def` subfolder to limit number of files at ↵Guillaume Gomez-0/+0
the top level
2025-05-05Created `tests/rustdoc/auto` subfolder to limit number of files at the top levelGuillaume Gomez-0/+0
2025-05-05Created `tests/rustdoc/anchors` subfolder to limit number of files at the ↵Guillaume Gomez-0/+0
top level
2025-05-05Created `tests/rustdoc/source-code-pages` subfolder to limit number of files ↵Guillaume Gomez-0/+0
at the top level
2025-05-05Created `tests/rustdoc/reexports` subfolder to limit number of files at the ↵Guillaume Gomez-0/+22
top level
2025-04-25Rollup merge of #137096 - ehuss:stabilize-doctest-xcompile, r=fmeaseMatthias Krüger-0/+34
Stabilize flags for doctest cross compilation This makes the following changes in preparation for supporting doctest cross-compiling in cargo: - Renames `--runtool` and `--runtool-arg` to `--test-runtool` and `--test-runtool-arg` to maintain consistency with other `--test-*` arguments. - Stabilizes the `--test-runtool` and `--test-runtool-arg`. These are needed in order to support cargo's `target.runner` option which specifies a runner to execute a cross-compiled doctest (for example, qemu). - Stabilizes the `--enable-per-target-ignores` flag by removing it and making it unconditionally enabled. This makes it possible to disable a doctest on a per-target basis, which I think will be helpful for rolling out this feature. These changes were suggested in https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stabilizing.20doctest.20xcompile/near/409281127 The intent is to stabilize the doctest-xcompile feature in cargo. This will help ensure that for projects that do cross-compile testing that their doctests are also covered. Currently there is a somewhat surprising behavior that they are ignored. Closes https://github.com/rust-lang/rust/issues/64245 try-job: x86_64-msvc-1
2025-04-18Rollup merge of #139913 - fmease:rustdoc-fix-fn-param-handling, r=GuillaumeGomezMatthias Krüger-8/+57
rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions) **(0)** PR #136411 aimed to stop rendering unnamed params of fn ptr types as underscores in the common case (e.g., `fn(_: i32)` → `fn(i32)`) to make the rendered output stylistically more conventional. **(0.a)** However, since the cleaning fn that the PR modified is also used for lowering the HIR params of foreign fns and required assoc fns in traits, it accidentally butchered the rendering of the latter two: ```rs pub trait Trait { fn assoc_fn(_: i32); } // as well as (Rust 2015 only): fn assoc_fn(i32); unsafe extern "C" { pub fn foreign_fn(_: i32); } // Since 1.86 the fns above gets mis-rendered as: pub fn assoc_fn(: i32) // <-- BUTCHERED pub unsafe extern "C" fn foreign_fn(: i32) // <-- BUTCHERED ``` **(0.b)** Furthermore, it broke parity with middle cleaning (which includes inlined cross-crate re-exports) re-regressing parts of #44306 I once fixed in PR #103885. **(1)** Lastly, PR #139035 introduced an ICE triggered by the following input file: ```rs trait Trait { fn anon(()) {} } // internal error: entered unreachable code ``` --- This PR fixes all of these regressions and in the first commit renames several types and fns to be more ~~correct~~ descriptive and legible. ~~It also refactors `Param.name` to be of type `Option<Symbol>` instead `Symbol` (where `None` ~ `kw::Empty`), so rendering mistakes like that can no longer creep in like that (ignoring tests). CC #137978.~~ Independently done in PR #139846 a day prior.
2025-04-17rustdoc: Properly clean fn params in all contextsLeón Orell Valerian Liehr-8/+57
2025-04-17Support inlined cross-crate re-exported trait aliasesLeón Orell Valerian Liehr-39/+95
2025-04-10replace `//@ compile-flags: --edition` with `//@ edition`Pietro Albini-8/+16
2025-03-27Stabilize --test-runtool and --test-runtool-argEric Huss-1/+0
2025-03-27Rename `--runtool` and `--runtool-arg`Eric Huss-3/+3
This renames `--runtool` and `--runtool-arg` to `--test-runtool` and `--test-runtool-arg` to maintain consistency with other `--test-*` arguments.
2025-03-27Add test for doctest runtoolEric Huss-0/+35
2025-03-27Correctly handle line comments in attributes and generate extern cratesGuillaume Gomez-1/+1
outside of wrapping function
2025-03-22rustdoc: be more strict about "Methods from Deref"binarycat-0/+27
hack: is_doc_subtype_of always returns true for TyAlias it's worth noting that this function is only used in the handling of "Methods from Deref", and we were previously assuming all generic parameters were meaningless, so this is still an improvment from the status quo. this change means that we will have strictly less false positives without adding any new false negitives. Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-03-15Add RTN support to rustdocMichael Goulet-0/+18
2025-03-06Rollup merge of #137764 - compiler-errors:always-applicable-negative-impl, ↵Michael Goulet-2/+2
r=lcnr Ensure that negative auto impls are always applicable r? lcnr (or reassign if you dont want to review) https://github.com/rust-lang/rust/issues/68318#issuecomment-2689265030
2025-03-06Rollup merge of #137534 - xizheyin:issue-137342, r=GuillaumeGomezMichael Goulet-24/+40
[rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden) Part of #137342 ![image](https://github.com/user-attachments/assets/68b4649a-a64a-43b2-8a73-6ac92b486e9e)
2025-03-04Make rustdoc tests use always applicable negative auto implsMichael Goulet-2/+2
2025-03-04[rustdoc] hide item that is not marked as doc(inline) and whose src is ↵xizheyin-24/+40
doc(hidden) Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-02-27Move "unused_exter_crate" test from rustdoc-ui to rustdocYotam Ofek-0/+19
2025-02-26Rollup merge of #137320 - tapanprakasht:fix-doc-version-stability, r=notriddleLeón Orell Valerian Liehr-0/+28
fix(rustdoc): Fixed stability version in rustdoc Tries to fix https://github.com/rust-lang/rust/issues/137141 Fixed by adding checks glob exports
2025-02-24remove support for rustc_intrinsic_must_be_overridden from the compilerRalf Jung-16/+4