Skip to content

Commit

Permalink
Merge pull request #598 from workingjubilee/pull-back-msrv
Browse files Browse the repository at this point in the history
Pull back MSRV on Windows
  • Loading branch information
ChrisDenton authored Mar 22, 2024
2 parents 6fa4b85 + edc9f5c commit bdc8b82
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check-binary-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ name: Check binary size

on:
pull_request_target:
branches:
- master
# HACK(jubilee): something broke the distributed LLVM libso and I don't know what.
branches: []
# - master

# Both the "measure" and "report" jobs need to know this.
env:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ jobs:
rust: stable
- os: macos-latest
rust: nightly
# Note that these are on nightly due to rust-lang/rust#63700 not being
# on stable yet
# HACK(jubilee): 1.77 broke backtraces on Windows lol
- os: windows-latest
rust: stable-x86_64-msvc
rust: 1.76.0-x86_64-msvc
- os: windows-latest
rust: stable-i686-msvc
rust: 1.76.0-i686-msvc
- os: windows-latest
rust: stable-x86_64-gnu
rust: 1.76.0-x86_64-gnu
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -234,7 +233,13 @@ jobs:

msrv:
name: MSRV
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: windows-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down
9 changes: 8 additions & 1 deletion src/symbolize/dbghelp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ use core::mem;
use core::ptr;
use core::slice;

// FIXME: replace with ptr::from_ref once MSRV is high enough
#[inline(always)]
#[must_use]
const fn ptr_from_ref<T: ?Sized>(r: &T) -> *const T {
r
}

// Store an OsString on std so we can provide the symbol name and filename.
pub struct Symbol<'a> {
name: *const [u8],
Expand Down Expand Up @@ -257,7 +264,7 @@ unsafe fn do_resolve(

let len = len as usize;

filename = Some(ptr::from_ref(slice::from_raw_parts(base, len)));
filename = Some(ptr_from_ref(slice::from_raw_parts(base, len)));
}

cb(&super::Symbol {
Expand Down

0 comments on commit bdc8b82

Please sign in to comment.