4545//! * Conversions between error types are done in an automatic and
4646//! consistent way - `From` conversion behavior is never specified
4747//! explicitly.
48- //! * Errors implement `Sync` and ` Send` .
48+ //! * Errors implement Send.
4949//! * Errors can carry backtraces.
5050//!
5151//! Similar to other libraries like [error-type] and [quick-error],
6161//! * Instead of defining the custom `Error` type as an enum, it is a
6262//! struct containing an `ErrorKind` (which defines the
6363//! `description` and `display` methods for the error), an opaque,
64- //! optional, boxed `std::error::Error + Sync + Send + 'static` object
64+ //! optional, boxed `std::error::Error + Send + 'static` object
6565//! (which defines the `cause`, and establishes the links in the
6666//! error chain), and a `Backtrace`.
6767//! * The macro also defines a `ResultExt` trait that defines a
68- //! `chain_err` method. This method on all `std::error::Error + Sync + Send + 'static`
68+ //! `chain_err` method. This method on all `std::error::Error + Send + 'static`
6969//! types extends the error chain by boxing the current
7070//! error into an opaque object and putting it inside a new concrete
7171//! error.
8686//! requiring an `Into` or `From` conversion; as well as slightly
8787//! more cumbersome to match on errors with another layer of types
8888//! to match.
89- //! * Because the error type contains `std::error::Error + Sync + Send + 'static` objects,
89+ //! * Because the error type contains `std::error::Error + Send + 'static` objects,
9090//! it can't implement `PartialEq` for easy comparisons.
9191//!
9292//! ## Declaring error types
261261//! ```
262262//!
263263//! `chain_err` can be called on any `Result` type where the contained
264- //! error type implements `std::error::Error + Sync + Send + 'static`. If
264+ //! error type implements `std::error::Error + Send + 'static`. If
265265//! the `Result` is an `Err` then `chain_err` evaluates the closure,
266266//! which returns *some type that can be converted to `ErrorKind`*,
267267//! boxes the original error to store as the cause, then returns a new
@@ -417,7 +417,7 @@ pub fn make_backtrace() -> Option<Arc<Backtrace>> {
417417
418418/// This trait is implemented on all the errors generated by the `error_chain`
419419/// macro.
420- pub trait ChainedError : error:: Error + Sync + Send + ' static {
420+ pub trait ChainedError : error:: Error + Send + ' static {
421421 /// Associated kind type.
422422 type ErrorKind ;
423423
@@ -449,7 +449,7 @@ pub trait ChainedError: error::Error + Sync + Send + 'static {
449449 /// of the errors from `foreign_links`.
450450 #[ cfg( feature = "backtrace" ) ]
451451 #[ doc( hidden) ]
452- fn extract_backtrace ( e : & ( error:: Error + Sync + Send + ' static ) ) -> Option < Arc < Backtrace > >
452+ fn extract_backtrace ( e : & ( error:: Error + Send + ' static ) ) -> Option < Arc < Backtrace > >
453453 where Self : Sized ;
454454}
455455
@@ -480,7 +480,7 @@ impl<'a, T> fmt::Display for Display<'a, T>
480480#[ doc( hidden) ]
481481pub struct State {
482482 /// Next error in the error chain.
483- pub next_error : Option < Box < error:: Error + Sync + Send > > ,
483+ pub next_error : Option < Box < error:: Error + Send > > ,
484484 /// Backtrace for the current error.
485485 #[ cfg( feature = "backtrace" ) ]
486486 pub backtrace : Option < Arc < Backtrace > > ,
@@ -504,7 +504,7 @@ impl Default for State {
504504impl State {
505505 /// Creates a new State type
506506 #[ cfg( feature = "backtrace" ) ]
507- pub fn new < CE : ChainedError > ( e : Box < error:: Error + Sync + Send > ) -> State {
507+ pub fn new < CE : ChainedError > ( e : Box < error:: Error + Send > ) -> State {
508508 let backtrace = CE :: extract_backtrace ( & * e) . or_else ( make_backtrace) ;
509509 State {
510510 next_error : Some ( e) ,
@@ -514,7 +514,7 @@ impl State {
514514
515515 /// Creates a new State type
516516 #[ cfg( not( feature = "backtrace" ) ) ]
517- pub fn new < CE : ChainedError > ( e : Box < error:: Error + Sync + Send > ) -> State {
517+ pub fn new < CE : ChainedError > ( e : Box < error:: Error + Send > ) -> State {
518518 State { next_error : Some ( e) }
519519 }
520520
0 commit comments