-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[StableMIR] API to retrieve definitions from crates #132131
Conversation
@rustbot author |
I implemented the suggested flow. So much cleaner! Thank you I wanted to double check two things:
So I implemented as a query for now. Since this code is not used during codegen, it may still be OK to add it to the trait, so let me know if you have any preference. Changing it shouldn't be hard though.
@rustbot ready |
Please squash this into one commit. We don't typically need PRs with this much granularity, especially since the latter basically reimplements the approach in the first half of this PR. |
Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, add a query to retrieve the number of defs in a foreign crate.
4ea10f9
to
0ce579f
Compare
@bors r+ rollup |
…er-errors [StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? `@compiler-errors:` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
…er-errors [StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? ``@compiler-errors:`` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132738 (Initialize channel `Block`s directly on the heap) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) r? `@ghost` `@rustbot` modify labels: rollup
…er-errors [StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? ```@compiler-errors:``` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132131 - celinval:smir-crate-defs, r=compiler-errors [StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? ````@compiler-errors:```` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
…er-errors [StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? ````@compiler-errors:```` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Add functions to retrieve function definitions and static items from all crates (local and external).
For external crates, we're still missing items from trait implementation and primitives.
r? @compiler-errors: Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!