]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/collect/type_of.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / librustc_typeck / collect / type_of.rs
index c4a8edd86f83fa18d9f0c72f3ca40a96d0b3ad90..41c205bc11b3594de9f7ea67f9cc117d6224e50e 100644 (file)
@@ -1,5 +1,4 @@
 use rustc::hir::map::Map;
-use rustc::session::parse::feature_err;
 use rustc::ty::subst::{GenericArgKind, InternalSubsts, Subst};
 use rustc::ty::util::IntTypeExt;
 use rustc::ty::{self, DefIdTree, Ty, TyCtxt, TypeFoldable};
@@ -11,6 +10,7 @@
 use rustc_hir::intravisit;
 use rustc_hir::intravisit::Visitor;
 use rustc_hir::Node;
+use rustc_session::parse::feature_err;
 use rustc_span::symbol::{sym, Ident};
 use rustc_span::{Span, DUMMY_SP};
 use rustc_trait_selection::traits;
@@ -47,7 +47,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
         },
 
         Node::ImplItem(item) => match item.kind {
-            ImplItemKind::Method(..) => {
+            ImplItemKind::Fn(..) => {
                 let substs = InternalSubsts::identity_for_item(tcx, def_id);
                 tcx.mk_fn_def(def_id, substs)
             }