// Check if this is one of the Fn,FnMut,FnOnce traits.
let tcx = self.tcx();
let kind = if Some(trait_def_id) == tcx.lang_items.fn_trait() {
- ty::FnClosureKind
+ ty::ClosureKind::Fn
} else if Some(trait_def_id) == tcx.lang_items.fn_mut_trait() {
- ty::FnMutClosureKind
+ ty::ClosureKind::FnMut
} else if Some(trait_def_id) == tcx.lang_items.fn_once_trait() {
- ty::FnOnceClosureKind
+ ty::ClosureKind::FnOnce
} else {
return Ok(());
};