File tree Expand file tree Collapse file tree
tests/rustdoc-ui/intra-doc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // This test ensures that the intra-doc link from reexported deprecated attribute note
2+ // are resolved where they are declared.
3+
4+ #![ deny( rustdoc:: broken_intra_doc_links) ]
5+
6+ #[ doc( inline) ]
7+ pub use bar:: sql_function_proc as sql_function;
8+
9+ pub fn define_sql_function ( ) { }
10+
11+ pub mod bar {
12+ #[ deprecated( note = "Use [`define_sql_function`] instead" ) ]
13+ //~^ ERROR: unresolved link
14+ //~| ERROR: unresolved link
15+ pub fn sql_function_proc ( ) { }
16+ }
Original file line number Diff line number Diff line change 1+ error: unresolved link to `define_sql_function`
2+ --> $DIR/deprecated-note-from-reexported.rs:12:25
3+ |
4+ LL | #[deprecated(note = "Use [`define_sql_function`] instead")]
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: the link appears in this line:
8+
9+ Use [`define_sql_function`] instead
10+ ^^^^^^^^^^^^^^^^^^^^^
11+ = note: no item named `define_sql_function` in scope
12+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
13+ note: the lint level is defined here
14+ --> $DIR/deprecated-note-from-reexported.rs:4:9
15+ |
16+ LL | #![deny(rustdoc::broken_intra_doc_links)]
17+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
19+ error: unresolved link to `define_sql_function`
20+ --> $DIR/deprecated-note-from-reexported.rs:12:25
21+ |
22+ LL | #[deprecated(note = "Use [`define_sql_function`] instead")]
23+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+ |
25+ = note: the link appears in this line:
26+
27+ Use [`define_sql_function`] instead
28+ ^^^^^^^^^^^^^^^^^^^^^
29+ = note: no item named `define_sql_function` in scope
30+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
31+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
32+
33+ error: aborting due to 2 previous errors
34+
You can’t perform that action at this time.
0 commit comments