@@ -392,7 +392,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
392392 Some ( ty) if expected == ty => {
393393 let source_map = self . tcx . sess . source_map ( ) ;
394394 err. span_suggestion (
395- source_map. end_point ( cause. span ( ) ) ,
395+ source_map. end_point ( cause. span ) ,
396396 "try removing this `?`" ,
397397 "" ,
398398 Applicability :: MachineApplicable ,
@@ -431,7 +431,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
431431 Some ( ty) if expected == ty => {
432432 let source_map = self . tcx . sess . source_map ( ) ;
433433 err. span_suggestion (
434- source_map. end_point ( cause. span ( ) ) ,
434+ source_map. end_point ( cause. span ) ,
435435 "try removing this `?`" ,
436436 "" ,
437437 Applicability :: MachineApplicable ,
@@ -1149,7 +1149,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
11491149 terr : TypeError < ' tcx > ,
11501150 prefer_label : bool ,
11511151 ) {
1152- let span = cause. span ( ) ;
1152+ let span = cause. span ;
11531153
11541154 // For some types of errors, expected-found does not make
11551155 // sense, so just ignore the values we were given.
@@ -1643,7 +1643,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
16431643 terr : TypeError < ' tcx > ,
16441644 ) -> Vec < TypeErrorAdditionalDiags > {
16451645 let mut suggestions = Vec :: new ( ) ;
1646- let span = trace. cause . span ( ) ;
1646+ let span = trace. cause . span ;
16471647 let values = self . resolve_vars_if_possible ( trace. values ) ;
16481648 if let Some ( ( expected, found) ) = values. ty ( ) {
16491649 match ( expected. kind ( ) , found. kind ( ) ) {
@@ -1793,7 +1793,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
17931793 ) -> Diag < ' a > {
17941794 debug ! ( "report_and_explain_type_error(trace={:?}, terr={:?})" , trace, terr) ;
17951795
1796- let span = trace. cause . span ( ) ;
1796+ let span = trace. cause . span ;
17971797 let failure_code = trace. cause . as_failure_code_diag (
17981798 terr,
17991799 span,
0 commit comments