Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/rustdoc-ui/intra-doc/deprecated-note-from-reexported.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ pub mod bar {
//~| ERROR: unresolved link
pub fn sql_function_proc() {}
}

pub use fuzz_test_helpers::*;

/// A type referenced in the deprecation note.
pub struct Env;

impl Env {
pub fn try_invoke(&self) {}
}

mod fuzz_test_helpers {
#[deprecated(note = "use [Env::try_invoke] instead")]
//~^ ERROR: unresolved link
//~| ERROR: unresolved link
pub fn fuzz_catch_panic() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ note: the lint level is defined here
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unresolved link to `Env::try_invoke`
--> $DIR/deprecated-note-from-reexported.rs:28:25
|
LL | #[deprecated(note = "use [Env::try_invoke] instead")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the link appears in this line:

use [Env::try_invoke] instead
^^^^^^^^^^^^^^^
= note: no item named `Env` in scope

error: unresolved link to `define_sql_function`
--> $DIR/deprecated-note-from-reexported.rs:12:25
|
Expand All @@ -30,5 +42,18 @@ LL | #[deprecated(note = "Use [`define_sql_function`] instead")]
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 2 previous errors
error: unresolved link to `Env::try_invoke`
--> $DIR/deprecated-note-from-reexported.rs:28:25
|
LL | #[deprecated(note = "use [Env::try_invoke] instead")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the link appears in this line:

use [Env::try_invoke] instead
^^^^^^^^^^^^^^^
= note: no item named `Env` in scope
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 4 previous errors

Loading