Add a builtin FnPtr
trait
This commit is contained in:
parent
7a0600714a
commit
0c13565ca6
20 changed files with 310 additions and 27 deletions
|
@ -974,7 +974,8 @@ fn visit_instance_use<'tcx>(
|
|||
| ty::InstanceDef::ClosureOnceShim { .. }
|
||||
| ty::InstanceDef::Item(..)
|
||||
| ty::InstanceDef::FnPtrShim(..)
|
||||
| ty::InstanceDef::CloneShim(..) => {
|
||||
| ty::InstanceDef::CloneShim(..)
|
||||
| ty::InstanceDef::FnPtrAddrShim(..) => {
|
||||
output.push(create_fn_mono_item(tcx, instance, source));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -278,7 +278,8 @@ fn characteristic_def_id_of_mono_item<'tcx>(
|
|||
| ty::InstanceDef::Intrinsic(..)
|
||||
| ty::InstanceDef::DropGlue(..)
|
||||
| ty::InstanceDef::Virtual(..)
|
||||
| ty::InstanceDef::CloneShim(..) => return None,
|
||||
| ty::InstanceDef::CloneShim(..)
|
||||
| ty::InstanceDef::FnPtrAddrShim(..) => return None,
|
||||
};
|
||||
|
||||
// If this is a method, we want to put it into the same module as
|
||||
|
@ -432,7 +433,8 @@ fn mono_item_visibility<'tcx>(
|
|||
| InstanceDef::Intrinsic(..)
|
||||
| InstanceDef::ClosureOnceShim { .. }
|
||||
| InstanceDef::DropGlue(..)
|
||||
| InstanceDef::CloneShim(..) => return Visibility::Hidden,
|
||||
| InstanceDef::CloneShim(..)
|
||||
| InstanceDef::FnPtrAddrShim(..) => return Visibility::Hidden,
|
||||
};
|
||||
|
||||
// The `start_fn` lang item is actually a monomorphized instance of a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue