Skip to content

Commit d4f24b1

Browse files
committed
Fix anonymous lifetime warnings for libbacktrace
1 parent 17493e1 commit d4f24b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/symbolize/libbacktrace.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum Symbol<'a> {
5757
}
5858

5959
impl Symbol<'_> {
60-
pub fn name(&self) -> Option<SymbolName> {
60+
pub fn name(&self) -> Option<SymbolName<'_>> {
6161
let symbol = |ptr: *const c_char| unsafe {
6262
if ptr.is_null() {
6363
None
@@ -119,7 +119,7 @@ impl Symbol<'_> {
119119
}
120120
}
121121

122-
pub fn filename_raw(&self) -> Option<BytesOrWideString> {
122+
pub fn filename_raw(&self) -> Option<BytesOrWideString<'_>> {
123123
self.filename_bytes().map(BytesOrWideString::Bytes)
124124
}
125125

@@ -178,7 +178,7 @@ extern "C" fn syminfo_cb(
178178
// not debug info, so if that happens we're sure to call the callback with
179179
// at least one symbol from the `syminfo_cb`.
180180
unsafe {
181-
let syminfo_state = &mut *(data as *mut SyminfoState);
181+
let syminfo_state = &mut *(data as *mut SyminfoState<'_>);
182182
let mut pcinfo_state = PcinfoState {
183183
symname,
184184
called: false,
@@ -222,7 +222,7 @@ extern "C" fn pcinfo_cb(
222222
let mut bomb = crate::Bomb { enabled: true };
223223

224224
unsafe {
225-
let state = &mut *(data as *mut PcinfoState);
225+
let state = &mut *(data as *mut PcinfoState<'_>);
226226
state.called = true;
227227
(state.cb)(&super::Symbol {
228228
inner: Symbol::Pcinfo {
@@ -438,7 +438,7 @@ unsafe fn init_state() -> *mut bt::backtrace_state {
438438
}
439439
}
440440

441-
pub unsafe fn resolve(what: ResolveWhat, cb: &mut dyn FnMut(&super::Symbol)) {
441+
pub unsafe fn resolve(what: ResolveWhat<'_>, cb: &mut dyn FnMut(&super::Symbol)) {
442442
let symaddr = what.address_or_ip() as usize;
443443

444444
// backtrace errors are currently swept under the rug

0 commit comments

Comments
 (0)