Skip to content

Commit

Permalink
Merge pull request #4102 from rust-lang/rustup-2024-12-21
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
oli-obk authored Dec 21, 2024
2 parents 4863b71 + 2d2ba6a commit 601b250
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8a1f8039a7ded79d3d4fe97b110016d89f2b11e2
13170cd787cb733ed24842ee825bcbd98dc01476
14 changes: 8 additions & 6 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,14 @@ pub fn iter_exported_symbols<'tcx>(
let dependency_format = dependency_formats
.get(&CrateType::Executable)
.expect("interpreting a non-executable crate");
for cnum in dependency_format.iter().enumerate().filter_map(|(num, &linkage)| {
// We add 1 to the number because that's what rustc also does everywhere it
// calls `CrateNum::new`...
#[expect(clippy::arithmetic_side_effects)]
(linkage != Linkage::NotLinked).then_some(CrateNum::new(num + 1))
}) {
for cnum in dependency_format
.iter_enumerated()
.filter_map(|(num, &linkage)| (linkage != Linkage::NotLinked).then_some(num))
{
if cnum == LOCAL_CRATE {
continue; // Already handled above
}

// We can ignore `_export_info` here: we are a Rust crate, and everything is exported
// from a Rust crate.
for &(symbol, _export_info) in tcx.exported_symbols(cnum) {
Expand Down

0 comments on commit 601b250

Please sign in to comment.