diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-06-25 14:13:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-25 14:13:43 +0200 |
| commit | 85b5253806531fecc01715318a8bc71a5a70d29a (patch) | |
| tree | 6cd96a4edda04a3f050dc8a4f1bd7ccfeff49d03 | |
| parent | e44f47adf7e2021bdbe5771a74646525437d7477 (diff) | |
| parent | 814f46c39d39145d176c1026b7b6a7be2440a1d1 (diff) | |
| download | rust-85b5253806531fecc01715318a8bc71a5a70d29a.tar.gz rust-85b5253806531fecc01715318a8bc71a5a70d29a.zip | |
Merge pull request #1382 from cuviper/indexmap-2
Upgrade to indexmap v2
| -rw-r--r-- | Cargo.lock | 28 | ||||
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/debuginfo/line_info.rs | 2 | ||||
| -rw-r--r-- | src/debuginfo/mod.rs | 2 |
4 files changed, 28 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock index c6d7ed4cd46..f351798918a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,6 +194,12 @@ dependencies = [ ] [[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + +[[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -206,7 +212,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] @@ -226,6 +232,12 @@ dependencies = [ ] [[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + +[[package]] name = "indexmap" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -236,6 +248,16 @@ dependencies = [ ] [[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] name = "libc" version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -283,7 +305,7 @@ checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", "hashbrown 0.13.2", - "indexmap", + "indexmap 1.9.3", "memchr", ] @@ -335,7 +357,7 @@ dependencies = [ "cranelift-native", "cranelift-object", "gimli", - "indexmap", + "indexmap 2.0.0", "libloading", "object", "smallvec", diff --git a/Cargo.toml b/Cargo.toml index 9c22cd78c69..023e5689d37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ target-lexicon = "0.12.0" gimli = { version = "0.27.2", default-features = false, features = ["write"]} object = { version = "0.30.3", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] } -indexmap = "1.9.3" +indexmap = "2.0.0" libloading = { version = "0.7.3", optional = true } smallvec = "1.8.1" diff --git a/src/debuginfo/line_info.rs b/src/debuginfo/line_info.rs index 463de6a91c7..43a0f65f31d 100644 --- a/src/debuginfo/line_info.rs +++ b/src/debuginfo/line_info.rs @@ -165,7 +165,7 @@ impl FunctionDebugContext { for &MachSrcLoc { start, end, loc } in mcr.buffer.get_srclocs_sorted() { debug_context.dwarf.unit.line_program.row().address_offset = u64::from(start); if !loc.is_default() { - let source_loc = *self.source_loc_set.get_index(loc.bits() as usize).unwrap(); + let source_loc = self.source_loc_set[loc.bits() as usize]; create_row_for_span(debug_context, source_loc); } else { create_row_for_span(debug_context, self.function_source_loc); diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs index 3a7421d8b30..8a4b1cccf14 100644 --- a/src/debuginfo/mod.rs +++ b/src/debuginfo/mod.rs @@ -38,7 +38,7 @@ pub(crate) struct DebugContext { pub(crate) struct FunctionDebugContext { entry_id: UnitEntryId, function_source_loc: (FileId, u64, u64), - source_loc_set: indexmap::IndexSet<(FileId, u64, u64)>, + source_loc_set: IndexSet<(FileId, u64, u64)>, } impl DebugContext { |
