-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make CrateItem::body() function return an option #138026
Merged
Merged
+57
−47
Conversation
This file contains 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
When we initially created `CrateItem`, it would only represent items that contain a body. That is no longer the case, for now, make this explicit by expanding the APIs to retrieve the item body. This is related to rust-lang/project-stable-mir#34
fbb0b30
to
4d75c4f
Compare
compiler-errors
approved these changes
Mar 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and also now that items don't need bodies this is an even better reason to fix the all_local_items
function not to just return the MIR keys :3 cc #138025 (comment)
Though this PR is fine to land.
@bors r+ rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2025
…kingjubilee Rollup of 15 pull requests Successful merges: - rust-lang#137829 (Stabilize [T]::split_off... methods) - rust-lang#137850 (Stabilize `box_uninit_write`) - rust-lang#137912 (Do not recover missing lifetime with random in-scope lifetime) - rust-lang#137913 (Allow struct field default values to reference struct's generics) - rust-lang#137923 (Simplify `<Postorder as Iterator>::size_hint`) - rust-lang#137949 (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK) - rust-lang#137963 (Add ``dyn`` keyword to `E0373` examples) - rust-lang#137975 (Remove unused `PpMode::needs_hir`) - rust-lang#137981 (rustdoc search: increase strictness of typechecking) - rust-lang#137986 (Fix some typos) - rust-lang#137991 (Add `avr-none` to SUMMARY.md and platform-support.md) - rust-lang#137993 (Remove obsolete comment from DeduceReadOnly) - rust-lang#137996 (Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync"") - rust-lang#138019 (Pretty-print `#[deprecated]` attribute in HIR.) - rust-lang#138026 (Make CrateItem::body() function return an option) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2025
Rollup merge of rust-lang#138026 - celinval:chores-item-has-body, r=compiler-errors Make CrateItem::body() function return an option When we initially created `CrateItem`, it would only represent items that contain a body. That is no longer the case, for now, make this explicit by expanding the APIs to retrieve the item body. This is related to rust-lang/project-stable-mir#34 r? `@oli-obk`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
When we initially created
CrateItem
, it would only represent items that contain a body.That is no longer the case, for now, make this explicit by expanding the APIs to retrieve the item body.
This is related to rust-lang/project-stable-mir#34
r? @oli-obk