Repository: gimli-rs/addr2line
Pull request #288 (2024-04-10 14:14:53)

Update dependencies
- object to 0.35
- memmap2 to 0.9


Patch:
diff --git a/Cargo.toml b/Cargo.toml
index 5baaa58..9e525c8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ name = "addr2line"
 version = "0.21.0"
 description = "A cross-platform symbolication library written in Rust, using `gimli`"
 documentation = "https://docs.rs/addr2line"
-exclude = ["/benches/*", "/fixtures/*", ".github"]
+exclude = ["/benches/*", "/fixtures/*", ".github", "*.sh", "*.r"]
 keywords = ["DWARF", "debug", "elf", "symbolicate", "atos"]
 categories = ["development-tools::debugging"]
 license = "Apache-2.0 OR MIT"
@@ -15,8 +15,8 @@ rust-version = "1.65"
 [dependencies]
 gimli = { version = "0.28.0", default-features = false, features = ["read"] }
 fallible-iterator = { version = "0.3.0", default-features = false, optional = true }
-memmap2 = { version = "0.5.5", optional = true }
-object = { version = "0.32.0", default-features = false, features = ["read"], optional = true }
+memmap2 = { version = "0.9.4", optional = true }
+object = { version = "0.35.0", default-features = false, features = ["read"], optional = true }
 smallvec = { version = "1", default-features = false, optional = true }
 rustc-demangle = { version = "0.1", optional = true }
 cpp_demangle = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
diff --git a/src/builtin_split_dwarf_loader.rs b/src/builtin_split_dwarf_loader.rs
index 4711931..7133b22 100644
--- a/src/builtin_split_dwarf_loader.rs
+++ b/src/builtin_split_dwarf_loader.rs
@@ -27,14 +27,14 @@ fn convert_path<R: gimli::Reader<Endian = gimli::RunTimeEndian>>(
     Ok(PathBuf::from(s))
 }
 
-fn load_section<'data: 'file, 'file, O, R, F>(
+fn load_section<'data, O, R, F>(
     id: gimli::SectionId,
-    file: &'file O,
+    file: &O,
     endian: R::Endian,
     loader: &mut F,
 ) -> Result<R, gimli::Error>
 where
-    O: object::Object<'data, 'file>,
+    O: object::Object<'data>,
     R: gimli::Reader<Endian = gimli::RunTimeEndian>,
     F: FnMut(Cow<'data, [u8]>, R::Endian) -> R,
 {
diff --git a/src/lib.rs b/src/lib.rs
index 3270aad..c2fc689 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -203,9 +203,7 @@ impl Context<gimli::EndianRcSlice<gimli::RunTimeEndian>> {
     /// Performance sensitive applications may want to use `Context::from_dwarf`
     /// with a more specialised `gimli::Reader` implementation.
     #[inline]
-    pub fn new<'data: 'file, 'file, O: object::Object<'data, 'file>>(
-        file: &'file O,
-    ) -> Result<Self, Error> {
+    pub fn new<'data, O: object::Object<'data>>(file: &O) -> Result<Self, Error> {
         Self::new_with_sup(file, None)
     }
 
@@ -219,9 +217,9 @@ impl Context<gimli::EndianRcSlice<gimli::RunTimeEndian>> {
     ///
     /// Performance sensitive applications may want to use `Context::from_dwarf`
     /// with a more specialised `gimli::Reader` implementation.
-    pub fn new_with_sup<'data: 'file, 'file, O: object::Object<'data, 'file>>(
-        file: &'file O,
-        sup_file: Option<&'file O>,
+    pub fn new_with_sup<'data, O: object::Object<'data>>(
+        file: &O,
+        sup_file: Option<&O>,
     ) -> Result<Self, Error> {
         let endian = if file.is_little_endian() {
             gimli::RunTimeEndian::Little
@@ -229,13 +227,13 @@ impl Context<gimli::EndianRcSlice<gimli::RunTimeEndian>> {
             gimli::RunTimeEndian::Big
         };
 
-        fn load_section<'data: 'file, 'file, O, Endian>(
+        fn load_section<'data, O, Endian>(
             id: gimli::SectionId,
-            file: &'file O,
+            file: &O,
             endian: Endian,
         ) -> Result<gimli::EndianRcSlice<Endian>, Error>
         where
-            O: object::Object<'data, 'file>,
+            O: object::Object<'data>,
             Endian: gimli::Endianity,
         {
             use object::ObjectSection;


Test patch:
diff --git a/tests/correctness.rs b/tests/correctness.rs
index 73ee462..9c78175 100644
--- a/tests/correctness.rs
+++ b/tests/correctness.rs
@@ -44,13 +44,13 @@ fn correctness() {
         gimli::RunTimeEndian::Big
     };
 
-    fn load_section<'data: 'file, 'file, O, Endian>(
+    fn load_section<'data, O, Endian>(
         id: gimli::SectionId,
-        file: &'file O,
+        file: &O,
         endian: Endian,
     ) -> Result<gimli::EndianArcSlice<Endian>, gimli::Error>
     where
-        O: object::Object<'data, 'file>,
+        O: object::Object<'data>,
         Endian: gimli::Endianity,
     {
         use object::ObjectSection;