From c39fa645544bd734c1bd0ded21a09f1df7f42feb Mon Sep 17 00:00:00 2001 From: Jujumba Date: Fri, 5 Jul 2024 18:02:54 +0200 Subject: [PATCH 1/2] Fix autolinks in the documentation --- mockall/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mockall/src/lib.rs b/mockall/src/lib.rs index 70f751a9..15cfe161 100644 --- a/mockall/src/lib.rs +++ b/mockall/src/lib.rs @@ -1273,7 +1273,7 @@ pub mod examples; /// # Limitations /// /// `#[automock]` can't handle everything. There are some cases where -/// you will need to use [`mock`] instead: +/// you will need to use [`mock!`] instead: /// * Mocking a struct that has multiple `impl` blocks, including /// structs that implement traits. /// * Mocking a struct or trait defined in another crate. @@ -1338,7 +1338,7 @@ pub use mockall_derive::concretize; /// Manually mock a structure. /// -/// Sometimes `automock` can't be used. In those cases you can use `mock!`, +/// Sometimes [`automock`] can't be used. In those cases you can use `mock!`, /// which basically involves repeating the struct's or trait's definitions. /// /// The format is: @@ -1368,7 +1368,7 @@ pub use mockall_derive::concretize; /// } /// # fn main() {} /// ``` -/// Mocking an unsupported `#[derive(X)]` attribute, e.g. `Clone`, is +/// Mocking an unsupported `#[derive(X)]` attribute, e.g. [`Clone`], is /// similar. /// ``` /// # use mockall_derive::mock; @@ -1388,7 +1388,7 @@ pub use mockall_derive::concretize; /// /// When mocking a generic struct's implementation of a generic trait, use the /// same name for their generic parameters. For example, if you wanted to mock -/// `Rc`, do +/// [`Rc`], do /// ``` /// # use mockall_derive::mock; /// mock!{ @@ -1424,6 +1424,8 @@ pub use mockall_derive::concretize; /// } /// # fn main() {} /// ``` +/// +/// [`Rc`]: std::rc::Rc pub use mockall_derive::mock; #[doc(hidden)] From 142844fc899d7916ca94d148e0ad703de5518f1c Mon Sep 17 00:00:00 2001 From: Jujumba Date: Sun, 7 Jul 2024 12:05:20 +0200 Subject: [PATCH 2/2] Remove link for `Rc` --- mockall/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mockall/src/lib.rs b/mockall/src/lib.rs index 15cfe161..4443e0ff 100644 --- a/mockall/src/lib.rs +++ b/mockall/src/lib.rs @@ -1388,7 +1388,7 @@ pub use mockall_derive::concretize; /// /// When mocking a generic struct's implementation of a generic trait, use the /// same name for their generic parameters. For example, if you wanted to mock -/// [`Rc`], do +/// `Rc`, do /// ``` /// # use mockall_derive::mock; /// mock!{ @@ -1424,8 +1424,6 @@ pub use mockall_derive::concretize; /// } /// # fn main() {} /// ``` -/// -/// [`Rc`]: std::rc::Rc pub use mockall_derive::mock; #[doc(hidden)]