@@ -66,7 +66,7 @@ use hir::map as hir_map;
66
66
use hir:: def_id:: DefId ;
67
67
use middle:: region;
68
68
use traits:: { ObligationCause , ObligationCauseCode } ;
69
- use ty:: { self , Region , TyCtxt , TypeFoldable } ;
69
+ use ty:: { self , Region , Ty , TyCtxt , TypeFoldable } ;
70
70
use ty:: error:: TypeError ;
71
71
use syntax:: ast:: DUMMY_NODE_ID ;
72
72
use syntax_pos:: { Pos , Span } ;
@@ -418,7 +418,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
418
418
name : String ,
419
419
sub : & ty:: subst:: Substs < ' tcx > ,
420
420
pos : usize ,
421
- other_ty : & ty :: Ty < ' tcx > ) {
421
+ other_ty : & Ty < ' tcx > ) {
422
422
// `value` and `other_value` hold two incomplete type representation for display.
423
423
// `name` is the path of both types being compared. `sub`
424
424
value. push_highlighted ( name) ;
@@ -491,7 +491,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
491
491
path : String ,
492
492
sub : & ty:: subst:: Substs < ' tcx > ,
493
493
other_path : String ,
494
- other_ty : & ty :: Ty < ' tcx > ) -> Option < ( ) > {
494
+ other_ty : & Ty < ' tcx > ) -> Option < ( ) > {
495
495
for ( i, ta) in sub. types ( ) . enumerate ( ) {
496
496
if & ta == other_ty {
497
497
self . highlight_outer ( & mut t1_out, & mut t2_out, path, sub, i, & other_ty) ;
@@ -522,7 +522,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
522
522
523
523
/// Compare two given types, eliding parts that are the same between them and highlighting
524
524
/// relevant differences, and return two representation of those types for highlighted printing.
525
- fn cmp ( & self , t1 : ty :: Ty < ' tcx > , t2 : ty :: Ty < ' tcx > )
525
+ fn cmp ( & self , t1 : Ty < ' tcx > , t2 : Ty < ' tcx > )
526
526
-> ( DiagnosticStyledString , DiagnosticStyledString )
527
527
{
528
528
match ( & t1. sty , & t2. sty ) {
@@ -743,7 +743,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
743
743
}
744
744
745
745
fn expected_found_str_ty ( & self ,
746
- exp_found : & ty:: error:: ExpectedFound < ty :: Ty < ' tcx > > )
746
+ exp_found : & ty:: error:: ExpectedFound < Ty < ' tcx > > )
747
747
-> Option < ( DiagnosticStyledString , DiagnosticStyledString ) > {
748
748
let exp_found = self . resolve_type_vars_if_possible ( exp_found) ;
749
749
if exp_found. references_error ( ) {
0 commit comments