Only compute DefKind through the query.
smallvec
For more information about how rustc works, see the rustc dev guide.