Skip to content

Commit

Permalink
Fix some more nightly warnings about lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jun 10, 2020
1 parent d4f24b1 commit 3cf8cbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/symbolize/dbghelp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ pub struct Symbol<'a> {
}

impl Symbol<'_> {
pub fn name(&self) -> Option<SymbolName> {
pub fn name(&self) -> Option<SymbolName<'_>> {
Some(SymbolName::new(unsafe { &*self.name }))
}

pub fn addr(&self) -> Option<*mut c_void> {
Some(self.addr as *mut _)
}

pub fn filename_raw(&self) -> Option<BytesOrWideString> {
pub fn filename_raw(&self) -> Option<BytesOrWideString<'_>> {
self.filename
.map(|slice| unsafe { BytesOrWideString::Wide(&*slice) })
}
Expand All @@ -81,7 +81,7 @@ impl Symbol<'_> {
#[repr(C, align(8))]
struct Aligned8<T>(T);

pub unsafe fn resolve(what: ResolveWhat, cb: &mut dyn FnMut(&super::Symbol)) {
pub unsafe fn resolve(what: ResolveWhat<'_>, cb: &mut dyn FnMut(&super::Symbol)) {
// Ensure this process's symbols are initialized
let dbghelp = match dbghelp::init() {
Ok(dbghelp) => dbghelp,
Expand Down
6 changes: 3 additions & 3 deletions src/symbolize/noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ use crate::SymbolName;
use core::ffi::c_void;
use core::marker;

pub unsafe fn resolve(_addr: ResolveWhat, _cb: &mut dyn FnMut(&super::Symbol)) {}
pub unsafe fn resolve(_addr: ResolveWhat<'_>, _cb: &mut dyn FnMut(&super::Symbol)) {}

pub struct Symbol<'a> {
_marker: marker::PhantomData<&'a i32>,
}

impl Symbol<'_> {
pub fn name(&self) -> Option<SymbolName> {
pub fn name(&self) -> Option<SymbolName<'_>> {
None
}

pub fn addr(&self) -> Option<*mut c_void> {
None
}

pub fn filename_raw(&self) -> Option<BytesOrWideString> {
pub fn filename_raw(&self) -> Option<BytesOrWideString<'_>> {
None
}

Expand Down

0 comments on commit 3cf8cbf

Please sign in to comment.