File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,18 @@ use std::fs;
33use std:: path:: Path ;
44use std:: process:: { Command , ExitStatus , Stdio } ;
55
6- // This code exercises the surface area that we expect of the std Backtrace
7- // type. If the current toolchain is able to compile it, we go ahead and use
8- // backtrace in anyhow.
6+ // This build script is copied from
7+ // [anyhow](https://github.com/dtolnay/anyhow/blob/master/build.rs),
8+ // and is a type of feature detection to determine if the current rust
9+ // toolchain has backtraces available.
10+ //
11+ // It exercises the surface area that we expect of the std Backtrace
12+ // type. If the current toolchain is able to compile it, we enable a
13+ // backtrace compiler configuration flag in http-types. We then
14+ // conditionally require the compiler feature in src/lib.rs with
15+ // `#![cfg_attr(backtrace, feature(backtrace))]`
16+ // and gate our backtrace code behind `#[cfg(backtrace)]`
17+
918const PROBE : & str = r#"
1019 #![feature(backtrace)]
1120 #![allow(dead_code)]
You can’t perform that action at this time.
0 commit comments