rustc_trait_selection::error_reporting::infer::need_type_info

Function closure_as_fn_str

Source
fn closure_as_fn_str<'tcx>(infcx: &InferCtxt<'tcx>, ty: Ty<'tcx>) -> String
Expand description

We don’t want to directly use ty_to_string for closures as their type isn’t really something users are familiar with. Directly printing the fn_sig of closures also doesn’t work as they actually use the “rust-call” API.