Skip to content

Commit 12220d4

Browse files
committed
2024 edition support
1 parent d8a68da commit 12220d4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
resolver = "2"
66
license = "MIT"
77
repository = "https://github.com/microsoft/tracing-etw"
8-
rust-version = "1.80"
8+
rust-version = "1.82"
99
authors = ["Kyle Sabo", "Microsoft"]
1010
description = "ETW or Linux user_events output for tokio-tracing"
1111

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ macro_rules! etw_event {
236236

237237
paste! {
238238
#[cfg(target_os = "linux")]
239-
#[link_section = "_etw_kw"]
239+
#[unsafe(link_section = "_etw_kw")]
240240
#[allow(non_upper_case_globals)]
241241
#[used]
242242
static mut [<ETW_META_PTR $name>]: *const $crate::_details::EventMetadata = &ETW_META;
243243
}
244244

245245
paste! {
246246
#[cfg(target_os = "windows")]
247-
#[link_section = ".rdata$zRSETW5"]
247+
#[unsafe(link_section = ".rdata$zRSETW5")]
248248
#[allow(non_upper_case_globals)]
249249
#[used]
250250
static mut [<ETW_META_PTR $name>]: *const $crate::_details::EventMetadata = &ETW_META;

src/native/etw.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ use tracing_subscriber::registry::{LookupSpan, SpanRef};
1616
// Items within this .rdata section will be sorted alphabetically, thus the start is named with "0", the end "9", and each metadata "5".
1717
// If these statics aren't mut then everything will silently fail to work.
1818
#[allow(non_upper_case_globals)]
19-
#[link_section = ".rdata$zRSETW0"]
19+
#[unsafe(link_section = ".rdata$zRSETW0")]
2020
pub(crate) static mut _start__etw_kw: usize = 0;
2121
#[allow(non_upper_case_globals)]
22-
#[link_section = ".rdata$zRSETW9"]
22+
#[unsafe(link_section = ".rdata$zRSETW9")]
2323
pub(crate) static mut _stop__etw_kw: usize = 0;
2424

2525
pub(crate) type ProviderGroupType = crate::native::native_guid;
@@ -71,7 +71,7 @@ impl AddFieldAndValue for &'_ mut tracelogging_dynamic::EventBuilder {
7171
ValueTypes::v_bool(b) => {
7272
self.add_bool32(fv.field_name, *b as i32, OutType::Default, 0);
7373
}
74-
ValueTypes::v_str(ref s) => {
74+
ValueTypes::v_str(s) => {
7575
self.add_str8(fv.field_name, s.as_ref(), OutType::Utf8, 0);
7676
}
7777
ValueTypes::v_char(c) => {

src/native/user_events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern "C" {
2828
pub(crate) static _stop__etw_kw: usize;
2929
}
3030

31-
#[link_section = "_etw_kw"]
31+
#[unsafe(link_section = "_etw_kw")]
3232
#[used]
3333
static mut ETW_META_PTR: *const crate::_details::EventMetadata = core::ptr::null();
3434

0 commit comments

Comments
 (0)