diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2022-02-01 15:37:30 +0800 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2022-02-04 22:26:33 +0800 |
| commit | afc0030ed3cf2ddaac52b637eeb1e629f8f39800 (patch) | |
| tree | b045142e1442b541536c4247d698f25288665691 /src/test/rustdoc | |
| parent | 4e8fb743ccbec27344b2dd42de7057f41d4ebfdd (diff) | |
| download | rust-afc0030ed3cf2ddaac52b637eeb1e629f8f39800.tar.gz rust-afc0030ed3cf2ddaac52b637eeb1e629f8f39800.zip | |
rustdoc: Collect traits in scope for foreign inherent impls
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/intra-doc/auxiliary/extern-inherent-impl-dep.rs | 11 | ||||
| -rw-r--r-- | src/test/rustdoc/intra-doc/extern-inherent-impl.rs | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/test/rustdoc/intra-doc/auxiliary/extern-inherent-impl-dep.rs b/src/test/rustdoc/intra-doc/auxiliary/extern-inherent-impl-dep.rs new file mode 100644 index 00000000000..ee4138b6865 --- /dev/null +++ b/src/test/rustdoc/intra-doc/auxiliary/extern-inherent-impl-dep.rs @@ -0,0 +1,11 @@ +#[derive(Clone)] +pub struct PublicStruct; + +mod inner { + use super::PublicStruct; + + impl PublicStruct { + /// [PublicStruct::clone] + pub fn method() {} + } +} diff --git a/src/test/rustdoc/intra-doc/extern-inherent-impl.rs b/src/test/rustdoc/intra-doc/extern-inherent-impl.rs new file mode 100644 index 00000000000..2e41c2214f4 --- /dev/null +++ b/src/test/rustdoc/intra-doc/extern-inherent-impl.rs @@ -0,0 +1,8 @@ +// Reexport of a structure with public inherent impls having doc links in their comments. The doc +// link points to an associated item, so we check that traits in scope for that link are populated. + +// aux-build:extern-inherent-impl-dep.rs + +extern crate extern_inherent_impl_dep; + +pub use extern_inherent_impl_dep::PublicStruct; |
