@@ -392,7 +392,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
392
392
Some ( ty) if expected == ty => {
393
393
let source_map = self . tcx . sess . source_map ( ) ;
394
394
err. span_suggestion (
395
- source_map. end_point ( cause. span ( ) ) ,
395
+ source_map. end_point ( cause. span ) ,
396
396
"try removing this `?`" ,
397
397
"" ,
398
398
Applicability :: MachineApplicable ,
@@ -431,7 +431,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
431
431
Some ( ty) if expected == ty => {
432
432
let source_map = self . tcx . sess . source_map ( ) ;
433
433
err. span_suggestion (
434
- source_map. end_point ( cause. span ( ) ) ,
434
+ source_map. end_point ( cause. span ) ,
435
435
"try removing this `?`" ,
436
436
"" ,
437
437
Applicability :: MachineApplicable ,
@@ -1149,7 +1149,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
1149
1149
terr : TypeError < ' tcx > ,
1150
1150
prefer_label : bool ,
1151
1151
) {
1152
- let span = cause. span ( ) ;
1152
+ let span = cause. span ;
1153
1153
1154
1154
// For some types of errors, expected-found does not make
1155
1155
// sense, so just ignore the values we were given.
@@ -1643,7 +1643,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
1643
1643
terr : TypeError < ' tcx > ,
1644
1644
) -> Vec < TypeErrorAdditionalDiags > {
1645
1645
let mut suggestions = Vec :: new ( ) ;
1646
- let span = trace. cause . span ( ) ;
1646
+ let span = trace. cause . span ;
1647
1647
let values = self . resolve_vars_if_possible ( trace. values ) ;
1648
1648
if let Some ( ( expected, found) ) = values. ty ( ) {
1649
1649
match ( expected. kind ( ) , found. kind ( ) ) {
@@ -1793,7 +1793,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
1793
1793
) -> Diag < ' a > {
1794
1794
debug ! ( "report_and_explain_type_error(trace={:?}, terr={:?})" , trace, terr) ;
1795
1795
1796
- let span = trace. cause . span ( ) ;
1796
+ let span = trace. cause . span ;
1797
1797
let failure_code = trace. cause . as_failure_code_diag (
1798
1798
terr,
1799
1799
span,
0 commit comments