|
8 | 8 | // option. This file may not be copied, modified, or distributed |
9 | 9 | // except according to those terms. |
10 | 10 |
|
11 | | -//! Conversion from AST representation of types to the ty.rs |
| 11 | +//! Conversion from AST representation of types to the `ty.rs` |
12 | 12 | //! representation. The main routine here is `ast_ty_to_ty()`: each use |
13 | 13 | //! is parameterized by an instance of `AstConv`. |
14 | 14 |
|
@@ -181,7 +181,6 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o { |
181 | 181 | item_segment: &hir::PathSegment) |
182 | 182 | -> &'tcx Substs<'tcx> |
183 | 183 | { |
184 | | - |
185 | 184 | let (substs, assoc_bindings) = item_segment.with_generic_args(|generic_args| { |
186 | 185 | self.create_substs_for_ast_path( |
187 | 186 | span, |
@@ -948,8 +947,8 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o { |
948 | 947 | ) |
949 | 948 | } |
950 | 949 |
|
951 | | - /// Transform a PolyTraitRef into a PolyExistentialTraitRef by |
952 | | - /// removing the dummy Self type (TRAIT_OBJECT_DUMMY_SELF). |
| 950 | + /// Transform a `PolyTraitRef` into a `PolyExistentialTraitRef` by |
| 951 | + /// removing the dummy `Self` type (`TRAIT_OBJECT_DUMMY_SELF`). |
953 | 952 | fn trait_ref_to_existential(&self, trait_ref: ty::TraitRef<'tcx>) |
954 | 953 | -> ty::ExistentialTraitRef<'tcx> { |
955 | 954 | assert_eq!(trait_ref.self_ty().sty, TRAIT_OBJECT_DUMMY_SELF); |
@@ -1347,7 +1346,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o { |
1347 | 1346 | err.span_label(span, "associated type not allowed here").emit(); |
1348 | 1347 | } |
1349 | 1348 |
|
1350 | | - // Check a type Path and convert it to a Ty. |
| 1349 | + // Check a type `Path` and convert it to a `Ty`. |
1351 | 1350 | pub fn def_to_ty(&self, |
1352 | 1351 | opt_self_ty: Option<Ty<'tcx>>, |
1353 | 1352 | path: &hir::Path, |
@@ -1442,8 +1441,8 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx>+'o { |
1442 | 1441 | /// Parses the programmer's textual representation of a type into our |
1443 | 1442 | /// internal notion of a type. |
1444 | 1443 | pub fn ast_ty_to_ty(&self, ast_ty: &hir::Ty) -> Ty<'tcx> { |
1445 | | - debug!("ast_ty_to_ty(id={:?}, ast_ty={:?})", |
1446 | | - ast_ty.id, ast_ty); |
| 1444 | + debug!("ast_ty_to_ty(id={:?}, ast_ty={:?} ty_ty={:?})", |
| 1445 | + ast_ty.id, ast_ty, ast_ty.node); |
1447 | 1446 |
|
1448 | 1447 | let tcx = self.tcx(); |
1449 | 1448 |
|
|
0 commit comments