@@ -558,16 +558,19 @@ pub use backtrace::Backtrace;
558
558
pub use backtrace:: InternalBacktrace ;
559
559
560
560
#[ derive( Debug ) ]
561
+ #[ allow( unknown_lints, bare_trait_objects) ]
561
562
/// Iterator over the error chain using the `Error::cause()` method.
562
563
pub struct Iter < ' a > ( Option < & ' a error:: Error > ) ;
563
564
564
565
impl < ' a > Iter < ' a > {
565
566
/// Returns a new iterator over the error chain using `Error::cause()`.
567
+ #[ allow( unknown_lints, bare_trait_objects) ]
566
568
pub fn new ( err : Option < & ' a error:: Error > ) -> Iter < ' a > {
567
569
Iter ( err)
568
570
}
569
571
}
570
572
573
+ #[ allow( unknown_lints, bare_trait_objects) ]
571
574
impl < ' a > Iterator for Iter < ' a > {
572
575
type Item = & ' a error:: Error ;
573
576
@@ -631,6 +634,7 @@ pub trait ChainedError: error::Error + Send + 'static {
631
634
/// Returns the first known backtrace, either from its State or from one
632
635
/// of the errors from `foreign_links`.
633
636
#[ doc( hidden) ]
637
+ #[ allow( unknown_lints, bare_trait_objects) ]
634
638
fn extract_backtrace ( e : & ( error:: Error + Send + ' static ) ) -> Option < InternalBacktrace >
635
639
where Self : Sized ;
636
640
}
@@ -661,6 +665,7 @@ impl<'a, T> fmt::Display for DisplayChain<'a, T>
661
665
/// Common state between errors.
662
666
#[ derive( Debug ) ]
663
667
#[ doc( hidden) ]
668
+ #[ allow( unknown_lints, bare_trait_objects) ]
664
669
pub struct State {
665
670
/// Next error in the error chain.
666
671
pub next_error : Option < Box < error:: Error + Send > > ,
@@ -679,6 +684,7 @@ impl Default for State {
679
684
680
685
impl State {
681
686
/// Creates a new State type
687
+ #[ allow( unknown_lints, bare_trait_objects) ]
682
688
pub fn new < CE : ChainedError > ( e : Box < error:: Error + Send > ) -> State {
683
689
let backtrace = CE :: extract_backtrace ( & * e)
684
690
. unwrap_or_else ( InternalBacktrace :: new) ;
0 commit comments