-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Stable MonoItem
#116465
Stable MonoItem
#116465
Conversation
r? @oli-obk (rustbot has picked a reviewer for you, use r? to override) |
r? @celinval |
Failed to set assignee to
|
This PR changes Stable MIR cc @oli-obk, @celinval, @spastorino This PR changes Stable MIR cc @oli-obk, @celinval, @spastorino |
DropGlue(DefId, Option<Ty>), | ||
CloneShim(DefId, Ty), | ||
FnPtrAddrShim(DefId, Ty), | ||
} |
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.
I don't think this should expose all the kinds of shims rustc has. This list changes occasionally. Instead I think you should have Item
, Intrinsic
, Virtual
and a generic Shim
variant which only exposes just enough to get the Stable MIR for the specific instantiation of said shim.
#[derive(Clone, Debug)] | ||
pub struct Instance { | ||
pub def: InstanceDef, | ||
pub args: GenericArgs, |
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.
Maybe merge this into the InstanceDef
variants? For shims this duplicates information with the Ty
and having it get out of sync could potentially crash the compiler and if it doesn't crash would likely misbehave.
Can we avoid having MonoItem and cc @ouz-a this is the same stuff that I've been talking about in https://rust-lang.zulipchat.com/#narrow/stream/320896-project-stable-mir/topic/Normalization.20of.20generic.20ZST/near/395236860 Only that in your case we can avoid it, and I'm hoping we can avoid it here, too, by keeping the result of @ericmarkmartin I'm assuming this is for your experiments in using SMIR in Kani? How does that logic there use |
☔ The latest upstream changes (presumably #116605) made this pull request unmergeable. Please resolve the merge conflicts. |
Add MonoItems and Instance to stable_mir Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body. This is related to rust-lang/project-stable-mir#36 r? `@oli-obk` `@oli-obk` is that what you were thinking? I incorporated `@bjorn3` idea of just adding a Shim instance definition in rust-lang#116465.
Add MonoItems and Instance to stable_mir Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body. This is related to rust-lang/project-stable-mir#36 r? ``@oli-obk`` ``@oli-obk`` is that what you were thinking? I incorporated ``@bjorn3`` idea of just adding a Shim instance definition in rust-lang#116465.
Rollup merge of rust-lang#116719 - celinval:smir-mono, r=oli-obk Add MonoItems and Instance to stable_mir Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body. This is related to rust-lang/project-stable-mir#36 r? ``@oli-obk`` ``@oli-obk`` is that what you were thinking? I incorporated ``@bjorn3`` idea of just adding a Shim instance definition in rust-lang#116465.
No description provided.