What does exclamation mean in trait implementation?


#1

So in rc.rs I see:

impl<T: ?Sized> !marker::Send for Rc<T> {}
impl<T: ?Sized> !marker::Sync for Rc<T> {}

What does this ! mean here? Guess it means Rc<T> is not implementing Send and Sync, since all the docs/books are stating that Rc cannot be sent or shared with other threads. However, in https://doc.rust-lang.org/stable/std/marker/trait.Sync.html there’s a line impl<T> Sync for Rc<T> where T: ?Sized which is making me further confused. Really appreciate it if anyone could explain what the ! sign stands for as I can’t find anywhere explaining it in either the Rust book or the Rust reference.


#2

#3

Your guess is correct.

That’s a bug in the documentation generator, which is fixed in the nightly docs.


#4

Thanks!