diff options
| author | bors <bors@rust-lang.org> | 2023-03-28 12:50:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-28 12:50:01 +0000 |
| commit | bf57e8ada6dc62369d1cee7ab055fb4074bd2d10 (patch) | |
| tree | 21cb8bce941e422c139fe496537d8ab823fadccc /compiler/rustc_const_eval | |
| parent | 60660371efe59dfc99644e9d709a1b71e25ae2ac (diff) | |
| parent | 5ae6caa0f04c686f0cc8a330f54390131148f899 (diff) | |
| download | rust-bf57e8ada6dc62369d1cee7ab055fb4074bd2d10.tar.gz rust-bf57e8ada6dc62369d1cee7ab055fb4074bd2d10.zip | |
Auto merge of #108080 - oli-obk:FnPtr-trait, r=lcnr
Add a builtin `FnPtr` trait that is implemented for all function pointers r? `@ghost` Rebased version of https://github.com/rust-lang/rust/pull/99531 (plus adjustments mentioned in the PR). If perf is happy with this version, I would like to land it, even if the diagnostics fix in 9df8e1befb5031a5bf9d8dfe25170620642d3c59 only works for `FnPtr` specifically, and does not generally improve blanket impls.
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/terminator.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index fc83985eaca..54d67bd1f29 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -382,6 +382,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { | ty::InstanceDef::FnPtrShim(..) | ty::InstanceDef::DropGlue(..) | ty::InstanceDef::CloneShim(..) + | ty::InstanceDef::FnPtrAddrShim(..) | ty::InstanceDef::Item(_) => { // We need MIR for this fn let Some((body, instance)) = |
