X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_const_eval%2Fsrc%2Futil%2Fcall_kind.rs;h=60b45856f51fbd24920e3634a27651b8f8f4f9aa;hb=05142a7e4495f09141fdd65f140fe44d8c200a9e;hp=11bb9508a1f8626ac347f33f45d7fb9ab9232630;hpb=32cbc7630b2d6b7141e2588f91380c1a58cf0016;p=rust.git diff --git a/compiler/rustc_const_eval/src/util/call_kind.rs b/compiler/rustc_const_eval/src/util/call_kind.rs index 11bb9508a1f..60b45856f51 100644 --- a/compiler/rustc_const_eval/src/util/call_kind.rs +++ b/compiler/rustc_const_eval/src/util/call_kind.rs @@ -45,7 +45,7 @@ pub enum CallKind<'tcx> { }, /// A call to `Fn(..)::call(..)`, desugared from `my_closure(a, b, c)` FnCall { fn_trait_id: DefId, self_ty: Ty<'tcx> }, - /// A call to an operator trait, desuraged from operator syntax (e.g. `a << b`) + /// A call to an operator trait, desugared from operator syntax (e.g. `a << b`) Operator { self_arg: Option, trait_id: DefId, self_ty: Ty<'tcx> }, DerefCoercion { /// The `Span` of the `Target` associated type @@ -132,7 +132,7 @@ pub fn call_kind<'tcx>( .parent(method_did) .filter(|did| tcx.def_kind(*did) == rustc_hir::def::DefKind::Impl) .and_then(|did| match tcx.type_of(did).kind() { - ty::Adt(def, ..) => Some(def.did), + ty::Adt(def, ..) => Some(def.did()), _ => None, }); let is_option_or_result = parent_self_ty.map_or(false, |def_id| {