Skip to content

Commit 1cdd5d0

Browse files
committed
Improve docs for InstanceDef::ReifyShim.
1 parent ea3ecf2 commit 1cdd5d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc/ty/instance.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ pub enum InstanceDef<'tcx> {
2828

2929
/// `fn()` pointer where the function itself cannot be turned into a pointer.
3030
///
31-
/// One example in the compiler today is functions annotated with `#[track_caller]`.
31+
/// One example in the compiler today is functions annotated with `#[track_caller]`, which
32+
/// must have their implicit caller location argument populated for a call. Because this is a
33+
/// required part of the function's ABI but can't be tracked as a property of the function
34+
/// pointer, we create a single "caller location" at the site where the function is reified.
3235
ReifyShim(DefId),
3336

3437
/// `<fn() as FnTrait>::call_*`

0 commit comments

Comments
 (0)