Skip to content

Commit 2f27cff

Browse files
committed
Comment what's going on in dbghelp
1 parent cf89c5d commit 2f27cff

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ fn main() {
88
//
99
// <https://github.com/rust-lang/rust/pull/53910>
1010
ac.emit_rustc_version(1, 30);
11-
}
11+
12+
println!("cargo:rerun-if-changed=build.rs");
13+
}

src/symbolize/dbghelp.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@
1010

1111
#![allow(bad_style)]
1212

13+
// This is a hack for compatibility with rustc 1.25.0. The no_std mode of this
14+
// crate is not supported pre-1.30.0, but in std mode the `char` module here
15+
// moved in rustc 1.26.0 (ish). As a result, in std mode we use `std::char` to
16+
// retain compatibility with rustc 1.25.0, but in `no_std` mode (which is
17+
// 1.30.0+ already) we use `core::char`.
1318
#[cfg(feature = "std")]
1419
use std::char;
20+
#[cfg(not(feature = "std"))]
21+
use core::char;
1522

1623
use core::mem;
1724
use core::slice;
18-
#[cfg(not(feature = "std"))]
19-
use core::char;
2025

2126
use winapi::ctypes::*;
2227
use winapi::shared::basetsd::*;

0 commit comments

Comments
 (0)