diff options
| author | varkor <github@varkor.com> | 2019-04-22 23:15:52 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-05-01 23:11:19 +0100 |
| commit | beb2f84b31efc5cb852f485672d3059acb706a88 (patch) | |
| tree | 1d069c8bf0a7bc9a769af1bcb9523f241118c5a7 | |
| parent | 388f823c03f539308695b06bbeb3a16bf11243e5 (diff) | |
| download | rust-beb2f84b31efc5cb852f485672d3059acb706a88.tar.gz rust-beb2f84b31efc5cb852f485672d3059acb706a88.zip | |
Resolve FIXME in probe.rs
| -rw-r--r-- | src/librustc_typeck/check/method/probe.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index 5a420c36615..a35777873ab 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -21,6 +21,7 @@ use rustc::traits::query::method_autoderef::{MethodAutoderefBadTy}; use rustc::ty::{self, ParamEnvAnd, Ty, TyCtxt, ToPolyTraitRef, ToPredicate, TraitRef, TypeFoldable}; use rustc::ty::GenericParamDefKind; use rustc::infer::type_variable::TypeVariableOrigin; +use rustc::infer::unify_key::ConstVariableOrigin; use rustc::util::nodemap::FxHashSet; use rustc::infer::{self, InferOk}; use rustc::infer::canonical::{Canonical, QueryResponse}; @@ -1572,7 +1573,9 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> { self.tcx.def_span(def_id))).into() } GenericParamDefKind::Const { .. } => { - unimplemented!() // FIXME(const_generics) + let span = self.tcx.def_span(def_id); + let origin = ConstVariableOrigin::SubstitutionPlaceholder(span); + self.next_const_var(self.tcx.type_of(param.def_id), origin).into() } } }) |
