Skip to content

Commit

Permalink
Forgot a bunch
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim committed Nov 29, 2024
1 parent 49893a0 commit 9381057
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions symbolic-common/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub trait AsSelf<'slf> {
type Ref: ?Sized;

/// Returns a reference to `self` with downcasted lifetime.
fn as_self(&'slf self) -> &Self::Ref;
fn as_self(&'slf self) -> &'slf Self::Ref;
}

impl AsSelf<'_> for u8 {
Expand All @@ -106,7 +106,7 @@ where
{
type Ref = [T::Ref];

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { &*(self as *const [T] as *const [T::Ref]) }
}
}
Expand All @@ -117,7 +117,7 @@ where
{
type Ref = T::Ref;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
(*self).as_self()
}
}
Expand All @@ -128,7 +128,7 @@ where
{
type Ref = T::Ref;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
(**self).as_self()
}
}
Expand All @@ -140,7 +140,7 @@ where
{
type Ref = [T::Ref];

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
(**self).as_self()
}
}
Expand All @@ -151,7 +151,7 @@ where
{
type Ref = T::Ref;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
(**self).as_self()
}
}
Expand All @@ -162,7 +162,7 @@ where
{
type Ref = T::Ref;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
(**self).as_self()
}
}
Expand Down Expand Up @@ -368,7 +368,7 @@ mod tests {
impl<'slf> AsSelf<'slf> for Foo<'_> {
type Ref = Foo<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/breakpad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ impl fmt::Debug for BreakpadObject<'_> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for BreakpadObject<'data> {
type Ref = BreakpadObject<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
4 changes: 2 additions & 2 deletions symbolic-debuginfo/src/dwarf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ impl<'d> DwarfInfo<'d> {
}

/// Returns an iterator over all compilation units.
fn units(&'d self, bcsymbolmap: Option<&'d BcSymbolMap<'d>>) -> DwarfUnitIterator<'_> {
fn units(&'d self, bcsymbolmap: Option<&'d BcSymbolMap<'d>>) -> DwarfUnitIterator<'d> {
DwarfUnitIterator {
info: self,
bcsymbolmap,
Expand All @@ -1242,7 +1242,7 @@ impl<'d> DwarfInfo<'d> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for DwarfInfo<'d> {
type Ref = DwarfInfo<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ impl fmt::Debug for ElfObject<'_> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for ElfObject<'data> {
type Ref = ElfObject<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/macho/bcsymbolmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl From<BcSymbolMapErrorKind> for BcSymbolMapError {
impl<'slf> AsSelf<'slf> for BcSymbolMap<'_> {
type Ref = BcSymbolMap<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
6 changes: 3 additions & 3 deletions symbolic-debuginfo/src/macho/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ impl fmt::Debug for MachObject<'_> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for MachObject<'d> {
type Ref = MachObject<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down Expand Up @@ -647,7 +647,7 @@ impl fmt::Debug for FatMachO<'_> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for FatMachO<'d> {
type Ref = FatMachO<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down Expand Up @@ -796,7 +796,7 @@ impl<'d> MachArchive<'d> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for MachArchive<'d> {
type Ref = MachArchive<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
4 changes: 2 additions & 2 deletions symbolic-debuginfo/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ impl<'data> Object<'data> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for Object<'data> {
type Ref = Object<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down Expand Up @@ -758,7 +758,7 @@ impl<'d> Archive<'d> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for Archive<'d> {
type Ref = Archive<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down
8 changes: 4 additions & 4 deletions symbolic-debuginfo/src/pdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl fmt::Debug for PdbObject<'_> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for PdbObject<'data> {
type Ref = PdbObject<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down Expand Up @@ -565,7 +565,7 @@ impl<'d> PdbDebugInfo<'d> {
}

/// Returns an iterator over all compilation units (modules).
fn units(&'d self) -> PdbUnitIterator<'_> {
fn units(&'d self) -> PdbUnitIterator<'d> {
PdbUnitIterator {
debug_info: self,
index: 0,
Expand All @@ -576,7 +576,7 @@ impl<'d> PdbDebugInfo<'d> {
self.type_formatter.modules()
}

fn get_module(&'d self, index: usize) -> Result<Option<&ModuleInfo<'_>>, PdbError> {
fn get_module(&'d self, index: usize) -> Result<Option<&'d ModuleInfo<'d>>, PdbError> {
// Silently ignore module references out-of-bound
let module = match self.modules().get(index) {
Some(module) => module,
Expand All @@ -599,7 +599,7 @@ impl<'d> PdbDebugInfo<'d> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for PdbDebugInfo<'d> {
type Ref = PdbDebugInfo<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/pe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ impl fmt::Debug for PeObject<'_> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for PeObject<'data> {
type Ref = PeObject<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
4 changes: 2 additions & 2 deletions symbolic-debuginfo/src/sourcebundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ impl<'data> SourceBundle<'data> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for SourceBundle<'data> {
type Ref = SourceBundle<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down Expand Up @@ -991,7 +991,7 @@ impl<'session> DebugSession<'session> for SourceBundleDebugSession<'_> {
impl<'slf, 'data: 'slf> AsSelf<'slf> for SourceBundleDebugSession<'data> {
type Ref = SourceBundleDebugSession<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
unsafe { std::mem::transmute(self) }
}
}
Expand Down
2 changes: 1 addition & 1 deletion symbolic-debuginfo/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl fmt::Debug for WasmObject<'_> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for WasmObject<'d> {
type Ref = WasmObject<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down
2 changes: 1 addition & 1 deletion symbolic-ppdb/src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl std::fmt::Debug for PortablePdbCache<'_> {
impl<'slf, 'd: 'slf> AsSelf<'slf> for PortablePdbCache<'d> {
type Ref = PortablePdbCache<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
2 changes: 1 addition & 1 deletion symbolic-sourcemapcache/src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub struct SourceMapCache<'data> {
impl<'slf, 'a: 'slf> AsSelf<'slf> for SourceMapCache<'a> {
type Ref = SourceMapCache<'slf>;

fn as_self(&'slf self) -> &Self::Ref {
fn as_self(&'slf self) -> &'slf Self::Ref {
self
}
}
Expand Down

0 comments on commit 9381057

Please sign in to comment.