Skip to content
Myr

Allow Send and Sync autotraits to be inferred

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 2bbf85a · Browse files · 2 files+13 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+13 added−3 removed

  • tests:+13 added−0 removed
  • other:+0 added−3 removed

2 files+13 added−3 removed

modified:src/error.rs-3 removed
429 unmodified lines
430 self.inner.debug(formatter)431 }432}433434unsafe impl Send for Error {}435unsafe impl Sync for Error {}436434impl Drop for Error {435 fn drop(&mut self) {436 unsafe {437 let inner = ptr::read(&self.inner);
291 unmodified lines
added:tests/test_autotrait.rs+13 added
1use anyhow::Error;23#[test]4fn test_send() {5 fn assert_send<T: Send>() {}6 assert_send::<Error>();7}89#[test]10fn test_sync() {11 fn assert_sync<T: Sync>() {}12 assert_sync::<Error>();13}