InstanceDef::requires_caller_location limited to items.
This commit is contained in:
parent
fd90e56120
commit
0ee922123f
1 changed files with 6 additions and 1 deletions
|
@ -141,7 +141,12 @@ impl<'tcx> InstanceDef<'tcx> {
|
|||
}
|
||||
|
||||
pub fn requires_caller_location(&self, tcx: TyCtxt<'_>) -> bool {
|
||||
tcx.codegen_fn_attrs(self.def_id()).flags.contains(CodegenFnAttrFlags::TRACK_CALLER)
|
||||
match *self {
|
||||
InstanceDef::Item(def_id) => {
|
||||
tcx.codegen_fn_attrs(def_id).flags.contains(CodegenFnAttrFlags::TRACK_CALLER)
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue