Skip to main content

## try_fn_sig

# Function try_fn_sig

Source

    fn try_fn_sig<'tcx>(
        tcx: TyCtxt<'tcx>,
        did: LocalDefId,
        attr_span: Span,
    ) -> Option<EarlyBinder<'tcx, PolyFnSig<'tcx>>>

Expand description

In some cases, attributes are only valid on functions, but it’s the `check_attr` pass that checks that they aren’t used anywhere else, rather than this module. In these cases, we bail from performing further checks that are only meaningful for functions (such as calling `fn_sig`, which ICEs if given a non-function). We also report a delayed bug, just in case `check_attr` isn’t doing its job.