-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add reachable_symbols API for retrieving all reachable items in crates #135436
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
Add reachable_symbols API for retrieving all reachable items in crates #135436
Conversation
… Reachable Items in Crates 🌟
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BoxyUwU (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment was marked as spam.
This comment was marked as spam.
The job Click to see the possible cause of the failure (guessed by this bot)
|
Please write your PR descriptions manually or at least concise. There is no reason to write a two page description for a trivial SMIR API addition. Also add a test, run tidy and make sure code you submit for review compiles. r? @oli-obk |
PR Title:
🚀 Enhance Rust Compiler: Add
reachable_symbols
API for Retrieving All Reachable Items in Crates 🌟PR Description:
🎯 Feature Addition:
This PR introduces the
reachable_symbols
API in the Rust compiler'srustc_middle
module. This new query allows us to obtain all reachable items in a crate, including non-exported symbols that are still accessible within the crate's context, such as public generic functions. 🌍🔧 Why this is important:
Until now, the Rust compiler provided access only to exported symbols of a crate. However, in certain use cases, it's crucial to retrieve all reachable symbols, including those that aren't explicitly exported. This new API enables seamless access to such symbols, improving the functionality and flexibility of the compiler's internals. ⚡
📜 Key Changes:
reachable_symbols
to theTyCtxt
API.DefId
items within a crate, offering more comprehensive visibility into the crate's symbols.💡 Benefits:
Output Log Example:
Additional Notes:
With this PR, Rust's internals will be significantly enhanced, offering more insights and allowing the ecosystem to unlock new possibilities for advanced crate exploration and tooling! 🚀✨
Call to Action:
Please review and provide feedback, as this feature brings enhanced functionality to the Rust compiler! 🎉
Issue:
🌟 Fixes: #121525