Skip to content

Commit bdc8b82

Browse files
authored
Merge pull request #598 from workingjubilee/pull-back-msrv
Pull back MSRV on Windows
2 parents 6fa4b85 + edc9f5c commit bdc8b82

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

.github/workflows/check-binary-size.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ name: Check binary size
66

77
on:
88
pull_request_target:
9-
branches:
10-
- master
9+
# HACK(jubilee): something broke the distributed LLVM libso and I don't know what.
10+
branches: []
11+
# - master
1112

1213
# Both the "measure" and "report" jobs need to know this.
1314
env:

.github/workflows/main.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ jobs:
2626
rust: stable
2727
- os: macos-latest
2828
rust: nightly
29-
# Note that these are on nightly due to rust-lang/rust#63700 not being
30-
# on stable yet
29+
# HACK(jubilee): 1.77 broke backtraces on Windows lol
3130
- os: windows-latest
32-
rust: stable-x86_64-msvc
31+
rust: 1.76.0-x86_64-msvc
3332
- os: windows-latest
34-
rust: stable-i686-msvc
33+
rust: 1.76.0-i686-msvc
3534
- os: windows-latest
36-
rust: stable-x86_64-gnu
35+
rust: 1.76.0-x86_64-gnu
3736
steps:
3837
- uses: actions/checkout@v3
3938
with:
@@ -234,7 +233,13 @@ jobs:
234233

235234
msrv:
236235
name: MSRV
237-
runs-on: ubuntu-20.04
236+
runs-on: ${{ matrix.os }}
237+
strategy:
238+
fail-fast: false
239+
matrix:
240+
include:
241+
- os: ubuntu-20.04
242+
- os: windows-latest
238243
steps:
239244
- uses: actions/checkout@v3
240245
with:

src/symbolize/dbghelp.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ use core::mem;
2626
use core::ptr;
2727
use core::slice;
2828

29+
// FIXME: replace with ptr::from_ref once MSRV is high enough
30+
#[inline(always)]
31+
#[must_use]
32+
const fn ptr_from_ref<T: ?Sized>(r: &T) -> *const T {
33+
r
34+
}
35+
2936
// Store an OsString on std so we can provide the symbol name and filename.
3037
pub struct Symbol<'a> {
3138
name: *const [u8],
@@ -257,7 +264,7 @@ unsafe fn do_resolve(
257264

258265
let len = len as usize;
259266

260-
filename = Some(ptr::from_ref(slice::from_raw_parts(base, len)));
267+
filename = Some(ptr_from_ref(slice::from_raw_parts(base, len)));
261268
}
262269

263270
cb(&super::Symbol {

0 commit comments

Comments
 (0)