about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-12-06 21:52:33 +0100
committerGitHub <noreply@github.com>2023-12-06 21:52:33 +0100
commit3c1357ca6b32fef50ab0d16d50fa54168c384cd6 (patch)
tree22ab643856916e8f257e72187ba842c5bacffc46 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parentcf78a79020d4f04ceeed755db2d28ee99baad683 (diff)
parent4a75d1893eb65baa5d65c0e1eb511daa8247c85e (diff)
downloadrust-3c1357ca6b32fef50ab0d16d50fa54168c384cd6.tar.gz
rust-3c1357ca6b32fef50ab0d16d50fa54168c384cd6.zip
Rollup merge of #118681 - celinval:fix-foreign-item, r=ouz-a
Fix is_foreign_item for StableMIR instance

Change the implementation of `Instance::is_foreign_item` to directly query the compiler for the instance `def_id` instead of incorrectly relying on the conversion to `CrateItem`. I also added a method to check if the instance has body, since the function already existed and it just wasn't exposed via public APIs. This makes it much cheaper for the user to check if the instance has body.

## Background:

- In pull https://github.com/rust-lang/rust/pull/118524, I fixed the conversion from Instance to CrateItem to avoid the conversion if the instance didn't have a body available. This broke the `is_foreign_item`.

r? `@ouz-a`
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions