use rustc::ty::{GenericParamDef, GenericParamDefKind};
use rustc::ty::subst::{self, Subst, InternalSubsts, SubstsRef};
use rustc::ty::wf::object_region_bounds;
-use rustc::mir::interpret::ConstValue;
use rustc_target::spec::abi;
use crate::require_c_abi_if_c_variadic;
use smallvec::SmallVec;
use syntax::ast;
-use syntax::errors::pluralise;
+use syntax::errors::pluralize;
use syntax::feature_gate::{GateIssue, emit_feature_err};
use syntax::util::lev_distance::find_best_match_for_name;
use syntax::symbol::sym;
quantifier,
bound,
kind,
- pluralise!(bound),
+ pluralize!(bound),
))
};
span,
E0191,
"the value of the associated type{} {} must be specified",
- pluralise!(associated_types.len()),
+ pluralize!(associated_types.len()),
names,
);
let (suggest, potential_assoc_types_spans) =
let def_id = tcx.hir().local_def_id(ast_const.hir_id);
let mut const_ = ty::Const {
- val: ConstValue::Unevaluated(
+ val: ty::ConstKind::Unevaluated(
def_id,
InternalSubsts::identity_for_item(tcx, def_id),
),
let generics = tcx.generics_of(item_def_id);
let index = generics.param_def_id_to_index[&tcx.hir().local_def_id(hir_id)];
let name = tcx.hir().name(hir_id);
- const_.val = ConstValue::Param(ty::ParamConst::new(index, name));
+ const_.val = ty::ConstKind::Param(ty::ParamConst::new(index, name));
}
tcx.mk_const(const_)