diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-02-19 13:03:41 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-19 13:03:41 +0530 |
| commit | 4a0f088f7c0e2899c86c708ff9586c1b3fcbe203 (patch) | |
| tree | 4630a15debedb29c76a4c8037654376c38b7959b /tests/rustdoc-ui/intra-doc | |
| parent | 4165de40f894757026229b5220ad4867bed7a2ff (diff) | |
| parent | efbf6547cfeb579c0fbed4306086708d31f7a59d (diff) | |
| download | rust-4a0f088f7c0e2899c86c708ff9586c1b3fcbe203.tar.gz rust-4a0f088f7c0e2899c86c708ff9586c1b3fcbe203.zip | |
Rollup merge of #107951 - petrochenkov:procmacdoc, r=jackh726
resolve: Fix doc links referring to other crates when documenting proc macro crates directly Fixes https://github.com/rust-lang/rust/issues/107950
Diffstat (limited to 'tests/rustdoc-ui/intra-doc')
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/proc-macro-doc.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs b/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs new file mode 100644 index 00000000000..8335fc902cc --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/proc-macro-doc.rs @@ -0,0 +1,27 @@ +// check-pass +// force-host +// no-prefer-dynamic +// compile-flags: --crate-type proc-macro + +#![deny(rustdoc::broken_intra_doc_links)] + +extern crate proc_macro; +use proc_macro::*; + +/// [`Unpin`] +#[proc_macro_derive(F)] +pub fn derive_(t: proc_macro::TokenStream) -> proc_macro::TokenStream { + t +} + +/// [`Vec`] +#[proc_macro_attribute] +pub fn attr(t: proc_macro::TokenStream, _: proc_macro::TokenStream) -> proc_macro::TokenStream { + t +} + +/// [`std::fs::File`] +#[proc_macro] +pub fn func(t: proc_macro::TokenStream) -> proc_macro::TokenStream { + t +} |
