Skip to content

Commit b41824e

Browse files
d-e-s-odanielocfb
authored andcommitted
capi: Lower MSRV to 1.70
As it turns out only recent versions of Rust seem to support matches on constants of types not implementing Eq. As a result, the library actually does not build on Rust 1.70 as advertised. Add the necessary derive implementations and make sure to enforce MSRV checks even for blazesym-c. Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent fb98ea7 commit b41824e

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ jobs:
143143
toolchain: 1.70.0
144144
- uses: Swatinem/rust-cache@v2
145145
- run: cargo build --features="apk,backtrace,bpf,demangle,dwarf,gsym,tracing"
146+
- run: cargo build --package=blazesym-c
146147
nop-rebuilds:
147148
name: No-op rebuilds
148149
runs-on: ubuntu-24.04

capi/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Unreleased
2+
----------
3+
- Lowered minimum supported Rust version to `1.70`
4+
5+
16
0.1.0
27
-----
38
- Introduced `blaze_trace` function for tapping into the library's

capi/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use blazesym::ErrorKind;
88
///
99
/// C ABI compatible version of [`blazesym::ErrorKind`].
1010
#[repr(transparent)]
11-
#[derive(Copy, Clone, Debug, PartialEq)]
11+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
1212
pub struct blaze_err(i16);
1313

1414
impl blaze_err {

capi/src/normalize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl From<(u64, usize)> for blaze_normalized_output {
276276

277277
/// The valid variant kind in [`blaze_user_meta`].
278278
#[repr(transparent)]
279-
#[derive(Debug, PartialEq)]
279+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
280280
pub struct blaze_user_meta_kind(u8);
281281

282282
impl blaze_user_meta_kind {
@@ -412,7 +412,7 @@ impl blaze_user_meta_elf {
412412
/// over time and, hence, should not be relied upon for the correctness of the
413413
/// application.
414414
#[repr(transparent)]
415-
#[derive(Copy, Clone, Debug, PartialEq)]
415+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
416416
pub struct blaze_normalize_reason(u8);
417417

418418
impl blaze_normalize_reason {

capi/src/symbolize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ pub type blaze_symbolizer = Symbolizer;
451451
/// change over time and, hence, should not be relied upon for the
452452
/// correctness of the application.
453453
#[repr(transparent)]
454-
#[derive(Copy, Clone, Debug, PartialEq)]
454+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
455455
pub struct blaze_symbolize_reason(u8);
456456

457457
impl blaze_symbolize_reason {

capi/src/trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::set_last_err;
1919

2020
/// The level at which to emit traces.
2121
#[repr(transparent)]
22-
#[derive(Copy, Clone, Debug, PartialEq)]
22+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
2323
pub struct blaze_trace_lvl(u8);
2424

2525
impl blaze_trace_lvl {

0 commit comments

Comments
 (0)