refactor(tree): Abstract the concept of a NodeId#15237
Merged
weihanglo merged 6 commits intorust-lang:masterfrom Feb 27, 2025
Merged
refactor(tree): Abstract the concept of a NodeId#15237weihanglo merged 6 commits intorust-lang:masterfrom
weihanglo merged 6 commits intorust-lang:masterfrom
Conversation
The primary goal is to make the code more type safe / easier to follow. This also can allow tracking debug information.
I found when debugging some issues with edges, having to track indices was making things much more difficult. My hope is this will help with little negative impact. We could put this behind a `#[cfg(debug_asserts)]` but I'm assuming it doesn't make enough of a performance difference to matter.
Collaborator
weihanglo
approved these changes
Feb 27, 2025
Member
weihanglo
left a comment
There was a problem hiding this comment.
All seem reasonable. Thanks for the refactor again!
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 28, 2025
Update cargo 11 commits in 1d1d646c06a84c1aa53967b394b7f1218f85db82..2622e844bc1e2e6123e54e94e4706f7b6195ce3d 2025-02-21 21:38:53 +0000 to 2025-02-28 12:33:57 +0000 - Bump `cc` to 1.2.16 to fix `x86` windows jobs in rust-lang/rust CI (rust-lang/cargo#15245) - refactor(tree): Abstract the concept of a NodeId (rust-lang/cargo#15237) - feat: implement RFC 3553 to add SBOM support (rust-lang/cargo#13709) - refactor(tree): Abstract the concept of an edge (rust-lang/cargo#15233) - chore: bump openssl to v3 (rust-lang/cargo#15232) - fix(package): Register workspace member renames in overlay (rust-lang/cargo#15228) - Implemented `build.build-dir` config option (rust-lang/cargo#15104) - feat: add completions for `--manifest-path` (rust-lang/cargo#15225) - chore: semver-check build-rs against beta channel (rust-lang/cargo#15223) - chore: depend on openssl-sys to correctly pin its version (rust-lang/cargo#15224) - chore: dont check cargo-util semver until 1.86 is released (rust-lang/cargo#15222)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
This is a follow up to #15233.
The primary goal is to make things more type safe / easier to follow through adding semantic information to the types.
A secondary benefit is this allows us to track some light weight debug information in NodeIds making debugging Edges a lot easier.
We could put this behind a
#[cfg(debug_asserts)]but I'm assuming this is cheap enough to not be worth doing that to the code.How should we test and review this PR?
Additional information