diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-20 09:46:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-20 09:46:52 +0100 |
| commit | 0e8085a095bfff4b8a5a3e1bcfbc5b0bae2dec5d (patch) | |
| tree | defc15bb6acbc7519ac4525260d19c9e2ee3c9ae /tests | |
| parent | 96d5dd6fca93322babc1caa531aa789f4e82ecf6 (diff) | |
| parent | 5e0fc0459e6ffd70ffbc0e540cce8623f21809a9 (diff) | |
| download | rust-0e8085a095bfff4b8a5a3e1bcfbc5b0bae2dec5d.tar.gz rust-0e8085a095bfff4b8a5a3e1bcfbc5b0bae2dec5d.zip | |
Rollup merge of #109266 - petrochenkov:docice4, r=petrochenkov
rustdoc: Correctly merge import's and its target's docs in one more case Fixes https://github.com/rust-lang/rust/issues/108334. Fixes https://github.com/rust-lang/rust/issues/108378. Fixes https://github.com/rust-lang/rust/issues/108658.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/import-inline-merge.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/import-inline-merge.rs b/tests/rustdoc-ui/intra-doc/import-inline-merge.rs new file mode 100644 index 00000000000..31fef032b0f --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/import-inline-merge.rs @@ -0,0 +1,16 @@ +// Import for `A` is inlined and doc comments on the import and `A` itself are merged. +// After the merge they still have correct parent scopes to resolve both `[A]` and `[B]`. + +// check-pass + +#![allow(rustdoc::private_intra_doc_links)] + +mod m { + /// [B] + pub struct A {} + + pub struct B {} +} + +/// [A] +pub use m::A; |
