Skip to content

Commit beb2f84

Browse files
committed
Resolve FIXME in probe.rs
1 parent 388f823 commit beb2f84

File tree

1 file changed

+4
-1
lines changed
  • src/librustc_typeck/check/method

1 file changed

+4
-1
lines changed

src/librustc_typeck/check/method/probe.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use rustc::traits::query::method_autoderef::{MethodAutoderefBadTy};
2121
use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt, ToPolyTraitRef, ToPredicate, TraitRef, TypeFoldable};
2222
use rustc::ty::GenericParamDefKind;
2323
use rustc::infer::type_variable::TypeVariableOrigin;
24+
use rustc::infer::unify_key::ConstVariableOrigin;
2425
use rustc::util::nodemap::FxHashSet;
2526
use rustc::infer::{self, InferOk};
2627
use rustc::infer::canonical::{Canonical, QueryResponse};
@@ -1572,7 +1573,9 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
15721573
self.tcx.def_span(def_id))).into()
15731574
}
15741575
GenericParamDefKind::Const { .. } => {
1575-
unimplemented!() // FIXME(const_generics)
1576+
let span = self.tcx.def_span(def_id);
1577+
let origin = ConstVariableOrigin::SubstitutionPlaceholder(span);
1578+
self.next_const_var(self.tcx.type_of(param.def_id), origin).into()
15761579
}
15771580
}
15781581
})

0 commit comments

Comments
 (0)