summaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs
index 13037e4..8783838 100644
--- a/macros/src/lib.rs
+++ b/macros/src/lib.rs
@@ -63,9 +63,11 @@ mod util;
/// {
/// let mut mock_foo = MockFoo::new();
///
-/// mock_foo
-/// .expect_bar()
-/// .returning(|foo, a: u32| format!("Hello {a}"));
+/// unsafe {
+/// mock_foo
+/// .expect_bar()
+/// .returning(|foo, a: u32| format!("Hello {a}"));
+/// }
///
/// assert_eq!(mock_foo.bar::<u32, String>(123), "Hello 123");
/// }