diff options
| author | bors <bors@rust-lang.org> | 2025-05-28 17:32:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-28 17:32:45 +0000 |
| commit | 6f69710780d579b180ab38da4c1384d630f7bd31 (patch) | |
| tree | cd6faf47da2cb40738c104cac3c4765c1e1ffa0c /tests/rustdoc-ui/intra-doc/bad-link-to-proc-macro.rs | |
| parent | 40311c4dcf666e8bddcec4a8059e7d9f12bbd363 (diff) | |
| parent | d6b1108cdae286fb680f310bc5929924bdf25965 (diff) | |
| download | rust-6f69710780d579b180ab38da4c1384d630f7bd31.tar.gz rust-6f69710780d579b180ab38da4c1384d630f7bd31.zip | |
Auto merge of #141696 - tgross35:rollup-fhpj180, r=tgross35
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140369 (Add data_ptr method to Mutex and RwLock) - rust-lang/rust#140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - rust-lang/rust#141404 (Improve intrinsic handling in cg_ssa) - rust-lang/rust#141411 (rustdoc: linking to a local proc macro no longer warns) - rust-lang/rust#141548 (consider glob imports in cfg suggestion) - rust-lang/rust#141627 (Drop-build cleanups) - rust-lang/rust#141670 (Fix ICE in tokenstream with contracts from parser recovery) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/rustdoc-ui/intra-doc/bad-link-to-proc-macro.rs')
| -rw-r--r-- | tests/rustdoc-ui/intra-doc/bad-link-to-proc-macro.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/bad-link-to-proc-macro.rs b/tests/rustdoc-ui/intra-doc/bad-link-to-proc-macro.rs new file mode 100644 index 00000000000..b449465768e --- /dev/null +++ b/tests/rustdoc-ui/intra-doc/bad-link-to-proc-macro.rs @@ -0,0 +1,21 @@ +//@ compile-flags: --crate-type=proc-macro --document-private-items +#![deny(rustdoc::broken_intra_doc_links)] + +//! Link to [`m`]. +//~^ ERROR `m` is both a module and a macro + +// test a further edge case related to https://github.com/rust-lang/rust/issues/91274 + +// we need to make sure that when there is actually an ambiguity +// in a proc-macro crate, we print out a sensible error. +// because proc macro crates can't normally export modules, +// this can only happen in --document-private-items mode. + +extern crate proc_macro; + +mod m {} + +#[proc_macro] +pub fn m(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + input +} |
