Skip to content

Commit dff7daa

Browse files
committed
Improve assert_impl_all! docs
1 parent 54d2ad5 commit dff7daa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/assert_impl.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/// assert_impl_all!(&str: Into<String>);
1414
/// ```
1515
///
16-
/// Raw pointers do not implement [`Send`] nor [`Sync`] because they cannot be
17-
/// sent between threads safely:
16+
/// The following example fails to compile because raw pointers do not implement
17+
/// [`Send`] since they cannot be moved between threads safely:
1818
///
1919
/// ```compile_fail
2020
/// # #[macro_use] extern crate static_assertions; fn main() {}
@@ -61,15 +61,16 @@ macro_rules! assert_impl_all {
6161
/// assert_not_impl_all!(u32: Into<u64>);
6262
/// ```
6363
///
64-
/// `Cell<u32>` is not both `Sync` and `Send`:
64+
/// The following compiles because [`Cell`] is not both [`Sync`] _and_ [`Send`]:
6565
///
6666
/// ```
6767
/// # #[macro_use] extern crate static_assertions; fn main() {}
6868
/// use std::cell::Cell;
6969
///
7070
/// assert_not_impl_all!(Cell<u32>: Sync, Send);
7171
/// ```
72-
/// But it is `Send`, so this fails to compile:
72+
///
73+
/// But it is [`Send`], so this fails to compile:
7374
///
7475
/// ```compile_fail
7576
/// # #[macro_use] extern crate static_assertions; fn main() {}
@@ -80,6 +81,7 @@ macro_rules! assert_impl_all {
8081
/// [`Send`]: https://doc.rust-lang.org/std/marker/trait.Send.html
8182
/// [`Sync`]: https://doc.rust-lang.org/std/marker/trait.Sync.html
8283
/// [`assert_not_impl_any!`]: macro.assert_not_impl_any.html
84+
/// [`Cell`]: https://doc.rust-lang.org/std/cell/struct.Cell.html
8385
/// [blanket]: https://doc.rust-lang.org/book/ch10-02-traits.html#using-trait-bounds-to-conditionally-implement-methods
8486
#[macro_export]
8587
macro_rules! assert_not_impl_all {

0 commit comments

Comments
 (0)