diff --git a/build.rs b/build.rs index 7bfdca1..3800683 100644 --- a/build.rs +++ b/build.rs @@ -17,7 +17,7 @@ compile_error! { const PROBE: &str = r#" #![feature(error_generic_member_access, provide_any)] - use std::any::Demand; + use std::any::{Demand, Provider}; use std::backtrace::{Backtrace, BacktraceStatus}; use std::error::Error; use std::fmt::{self, Display}; @@ -39,6 +39,12 @@ const PROBE: &str = r#" } } + struct P; + + impl Provider for P { + fn provide<'a>(&'a self, _demand: &mut Demand<'a>) {} + } + const _: fn() = || { let backtrace: Backtrace = Backtrace::capture(); let status: BacktraceStatus = backtrace.status();