Skip to content

Commit

Permalink
Add impl Provider in build.rs probe
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 13, 2022
1 parent b7448d3 commit ee49ec0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.rs
Expand Up @@ -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};
Expand All @@ -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();
Expand Down

0 comments on commit ee49ec0

Please sign in to comment.