MCPcopy
hub / github.com/uber-go/nilaway / EscapeFieldAnnotationKey

Struct EscapeFieldAnnotationKey

annotation/key.go:554–556  ·  view source on GitHub ↗

EscapeFieldAnnotationKey allows the Lookup of a field's Annotation in the Annotation map For fields of depth 1, with struct initialization check, we track the nilability using param field and return field. Anything that is not trackable using those, rely on the default nilability of the field. Thus,

Source from the content-addressed store, hash-verified

552// e.g., if we have fun(&A{}) then the field aptr is considered escaped
553// TODO: Add struct assignment as another possible cause of field escape
554type EscapeFieldAnnotationKey struct {
555 FieldDecl *types.Var
556}
557
558// Lookup looks this key up in the passed map, returning a Val
559// Currently, the annotation key is used only with inference

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected