@@ -115,12 +115,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
115
115
116
116
self . write_ty ( pat. hir_id , ty) ;
117
117
118
- // (*) In most of the cases above (literals and constants being
119
- // the exception), we relate types using strict equality, even
120
- // though subtyping would be sufficient. There are a few reasons
121
- // for this, some of which are fairly subtle and which cost me
122
- // (nmatsakis) an hour or two debugging to remember, so I thought
123
- // I'd write them down this time.
118
+ // (note_1): In most of the cases where (note_1) is referenced
119
+ // (literals and constants being the exception), we relate types
120
+ // using strict equality, even though subtyping would be sufficient.
121
+ // There are a few reasons for this, some of which are fairly subtle
122
+ // and which cost me (nmatsakis) an hour or two debugging to remember,
123
+ // so I thought I'd write them down this time.
124
124
//
125
125
// 1. There is no loss of expressiveness here, though it does
126
126
// cause some inconvenience. What we are saying is that the type
@@ -427,12 +427,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
427
427
428
428
// `x` is assigned a value of type `&M T`, hence `&M T <: typeof(x)`
429
429
// is required. However, we use equality, which is stronger.
430
- // See (* ) for an explanation.
430
+ // See (note_1 ) for an explanation.
431
431
region_ty
432
432
}
433
433
// Otherwise, the type of x is the expected type `T`.
434
434
ty:: BindByValue ( _) => {
435
- // As above, `T <: typeof(x)` is required, but we use equality, see (*) below .
435
+ // As above, `T <: typeof(x)` is required, but we use equality, see (note_1) .
436
436
expected
437
437
}
438
438
} ;
@@ -955,11 +955,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
955
955
let expected = self . shallow_resolve ( expected) ;
956
956
if self . check_dereferencable ( pat. span , expected, & inner) {
957
957
// `demand::subtype` would be good enough, but using `eqtype` turns
958
- // out to be equally general. See (*) below for details.
958
+ // out to be equally general. See (note_1) for details.
959
959
960
960
// Take region, inner-type from expected type if we can,
961
961
// to avoid creating needless variables. This also helps with
962
- // the bad interactions of the given hack detailed in (*) below .
962
+ // the bad interactions of the given hack detailed in (note_1) .
963
963
debug ! ( "check_pat_ref: expected={:?}" , expected) ;
964
964
let ( rptr_ty, inner_ty) = match expected. sty {
965
965
ty:: Ref ( _, r_ty, r_mutbl) if r_mutbl == mutbl => {
0 commit comments