pub fn returns_wrapped_self(tcx: TyCtxt<'_>, def_id: DefId) -> boolExpand description
Returns true when the function is a “wrapped” constructor that returns
Option<Self> / Result<Self, _> rather than a bare Self.
get_type classifies these as FnKind::Constructor, but for the wrapped
forms the None/Err paths do not produce a Self. Contract place
resolution uses this to select the Some/Ok field of the return value.
(Box<Self> is intentionally not included: every path still produces a
Self behind the pointer.)