File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1072,14 +1072,8 @@ pub enum ConsiderAddingAwait {
10721072 #[ primary_span]
10731073 span : Span ,
10741074 } ,
1075- #[ suggestion(
1076- infer_await_future,
1077- code = ".await" ,
1078- style = "verbose" ,
1079- applicability = "maybe-incorrect"
1080- ) ]
10811075 #[ note( infer_await_note) ]
1082- FutureSuggWithNote {
1076+ FutureSuggNote {
10831077 #[ primary_span]
10841078 span : Span ,
10851079 } ,
Original file line number Diff line number Diff line change @@ -223,7 +223,11 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
223223 _ => Some ( ConsiderAddingAwait :: BothFuturesHelp ) ,
224224 } ,
225225 ( _, 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 } )
227231 }
228232 ( Some ( ty) , _) if self . same_type_modulo_infer ( ty, exp_found. found ) => match cause. code ( )
229233 {
You can’t perform that action at this time.
0 commit comments