Skip to content
Myr

Add impl Provider in build.rs probe

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent b7448d3 · Browse files · 1 file+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−1 removed

  • other:+7 added−1 removed

1 file+7 added−1 removed

modified:build.rs+7 added-1 removed
15 unmodified lines
16// backtrace in anyhow.17const PROBE: &str = r#"18 #![feature(error_generic_member_access, provide_any)]1920 use std::any::Demand;20 use std::any::{Demand, Provider};21 use std::backtrace::{Backtrace, BacktraceStatus};22 use std::error::Error;23 use std::fmt::{self, Display};24
13 unmodified lines
38 demand.provide_ref(&self.backtrace);39 }40 }4142 struct P;4344 impl Provider for P {45 fn provide<'a>(&'a self, _demand: &mut Demand<'a>) {}46 }4748 const _: fn() = || {49 let backtrace: Backtrace = Backtrace::capture();50 let status: BacktraceStatus = backtrace.status();51 match status {
80 unmodified lines