pub struct PathSeg(pub DefId, pub usize);
pub trait AstConv<'gcx, 'tcx> {
- fn tcx<'a>(&'a self) -> TyCtxt<'tcx, 'gcx, 'tcx>;
+ fn tcx<'a>(&'a self) -> TyCtxt<'gcx, 'tcx>;
/// Returns the set of bounds in scope for the type parameter with
/// the given id.
/// Report error if there is an explicit type parameter when using `impl Trait`.
fn check_impl_trait(
- tcx: TyCtxt<'_, '_, '_>,
+ tcx: TyCtxt<'_, '_>,
span: Span,
seg: &hir::PathSegment,
generics: &ty::Generics,
/// Checks that the correct number of generic arguments have been provided.
/// Used specifically for function calls.
pub fn check_generic_arg_count_for_call(
- tcx: TyCtxt<'_, '_, '_>,
+ tcx: TyCtxt<'_, '_>,
span: Span,
def: &ty::Generics,
seg: &hir::PathSegment,
/// Checks that the correct number of generic arguments have been provided.
/// This is used both for datatypes and function calls.
fn check_generic_arg_count(
- tcx: TyCtxt<'_, '_, '_>,
+ tcx: TyCtxt<'_, '_>,
span: Span,
def: &ty::Generics,
args: &hir::GenericArgs,
/// - `inferred_kind`: if no parameter was provided, and inference is enabled, then
/// creates a suitable inference variable.
pub fn create_substs_for_generic_args<'b>(
- tcx: TyCtxt<'tcx, 'gcx, 'tcx>,
+ tcx: TyCtxt<'gcx, 'tcx>,
def_id: DefId,
parent_substs: &[Kind<'tcx>],
has_self: bool,
has_err
}
- pub fn prohibit_assoc_ty_binding(tcx: TyCtxt<'_, '_, '_>, span: Span) {
+ pub fn prohibit_assoc_ty_binding(tcx: TyCtxt<'_, '_>, span: Span) {
let mut err = struct_span_err!(tcx.sess, span, E0229,
"associated type bindings are not allowed here");
err.span_label(span, "associated type not allowed here").emit();
/// where-clauses). Because some of our bounds listings (e.g.,
/// regions) don't include the self-type, you must supply the
/// self-type here (the `param_ty` parameter).
- pub fn predicates(&self, tcx: TyCtxt<'tcx, 'gcx, 'tcx>, param_ty: Ty<'tcx>)
- -> Vec<(ty::Predicate<'tcx>, Span)>
- {
+ pub fn predicates(
+ &self,
+ tcx: TyCtxt<'gcx, 'tcx>,
+ param_ty: Ty<'tcx>,
+ ) -> Vec<(ty::Predicate<'tcx>, Span)> {
// If it could be sized, and is, add the `Sized` predicate.
let sized_predicate = self.implicitly_sized.and_then(|span| {
tcx.lang_items().sized_trait().map(|sized| {