File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1072,14 +1072,8 @@ pub enum ConsiderAddingAwait {
1072
1072
#[ primary_span]
1073
1073
span : Span ,
1074
1074
} ,
1075
- #[ suggestion(
1076
- infer_await_future,
1077
- code = ".await" ,
1078
- style = "verbose" ,
1079
- applicability = "maybe-incorrect"
1080
- ) ]
1081
1075
#[ note( infer_await_note) ]
1082
- FutureSuggWithNote {
1076
+ FutureSuggNote {
1083
1077
#[ primary_span]
1084
1078
span : Span ,
1085
1079
} ,
Original file line number Diff line number Diff line change @@ -223,7 +223,11 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
223
223
_ => Some ( ConsiderAddingAwait :: BothFuturesHelp ) ,
224
224
} ,
225
225
( _, Some ( ty) ) if self . same_type_modulo_infer ( exp_found. expected , ty) => {
226
- Some ( ConsiderAddingAwait :: FutureSuggWithNote { span : exp_span. shrink_to_hi ( ) } )
226
+ // FIXME: Seems like we can't have a suggestion and a note with different spans in a single subdiagnostic
227
+ diag. subdiagnostic ( ConsiderAddingAwait :: FutureSugg {
228
+ span : exp_span. shrink_to_hi ( ) ,
229
+ } ) ;
230
+ Some ( ConsiderAddingAwait :: FutureSuggNote { span : exp_span } )
227
231
}
228
232
( Some ( ty) , _) if self . same_type_modulo_infer ( ty, exp_found. found ) => match cause. code ( )
229
233
{
You can’t perform that action at this time.
0 commit comments