X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_typeck%2Fastconv.rs;h=2c9309a1696cfd65210643a491bcb1470caffac1;hb=fff08cb04389497d254fb40948674cbbee402908;hp=92a28defa5553f461455096813152391cba4988d;hpb=244125350880ca2f905928cae4115867eedd301a;p=rust.git diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 92a28defa55..2c9309a1696 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -41,7 +41,7 @@ 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. @@ -208,7 +208,7 @@ pub fn ast_path_substs_for_ty(&self, /// 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, @@ -239,7 +239,7 @@ fn check_impl_trait( /// 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, @@ -271,7 +271,7 @@ pub fn check_generic_arg_count_for_call( /// 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, @@ -462,7 +462,7 @@ fn check_generic_arg_count( /// - `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, @@ -1810,7 +1810,7 @@ pub fn prohibit_generics<'a, T: IntoIterator>( 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(); @@ -2420,9 +2420,11 @@ impl<'gcx, 'tcx> Bounds<'tcx> { /// 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| {