summaryrefslogtreecommitdiffstats
path: root/third_party/rust/thiserror/src/provide.rs
blob: 524e7435d784ed1aa28ddd43e6a1e29e35853846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::any::{Demand, Provider};

pub trait ThiserrorProvide: Sealed {
    fn thiserror_provide<'a>(&'a self, demand: &mut Demand<'a>);
}

impl<T: Provider + ?Sized> ThiserrorProvide for T {
    #[inline]
    fn thiserror_provide<'a>(&'a self, demand: &mut Demand<'a>) {
        self.provide(demand);
    }
}

pub trait Sealed {}
impl<T: Provider + ?Sized> Sealed for T {}