@@ -263,7 +263,7 @@ impl<'tcx> Cx<'tcx> {
263
263
// Here comes the interesting stuff:
264
264
hir:: ExprKind :: MethodCall ( segment, ref args, fn_span) => {
265
265
// Rewrite a.b(c) into UFCS form like Trait::b(a, c)
266
- let expr = self . method_callee ( expr, segment. ident . span , None ) ;
266
+ let expr = self . method_callee ( expr, segment. span ( ) , None ) ;
267
267
// When we apply adjustments to the receiver, use the span of
268
268
// the overall method call for better diagnostics. args[0]
269
269
// is guaranteed to exist, since a method call always has a receiver.
@@ -347,6 +347,7 @@ impl<'tcx> Cx<'tcx> {
347
347
variant_index : index,
348
348
fields : field_refs,
349
349
user_ty,
350
+ ctor_span : fun. span ,
350
351
base : None ,
351
352
} ) )
352
353
} else {
@@ -471,6 +472,7 @@ impl<'tcx> Cx<'tcx> {
471
472
variant_index : VariantIdx :: new ( 0 ) ,
472
473
substs,
473
474
user_ty,
475
+ ctor_span : qpath. span ( ) ,
474
476
fields : self . field_refs ( fields) ,
475
477
base : base. as_ref ( ) . map ( |base| FruInfo {
476
478
base : self . mirror_expr ( base) ,
@@ -497,6 +499,7 @@ impl<'tcx> Cx<'tcx> {
497
499
variant_index : index,
498
500
substs,
499
501
user_ty,
502
+ ctor_span : qpath. span ( ) ,
500
503
fields : self . field_refs ( fields) ,
501
504
base : None ,
502
505
} ) )
@@ -862,6 +865,7 @@ impl<'tcx> Cx<'tcx> {
862
865
variant_index : adt_def. variant_index_with_ctor_id ( def_id) ,
863
866
substs,
864
867
user_ty : user_provided_type,
868
+ ctor_span : expr. span ,
865
869
fields : Box :: new ( [ ] ) ,
866
870
base : None ,
867
871
} ) ) ,
0 commit comments