]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trait_selection/traits/error_reporting/mod.rs
Fix whitespace in `?Sized` structured suggestion
[rust.git] / src / librustc_trait_selection / traits / error_reporting / mod.rs
index 784fc36e67e655242aad0cedc8fd1c1b3530a414..0d53df3bf4b466ecba0500bc69560e8a7e498df8 100644 (file)
@@ -402,6 +402,7 @@ fn report_selection_error(
                         self.suggest_remove_reference(&obligation, &mut err, &trait_ref);
                         self.suggest_semicolon_removal(&obligation, &mut err, span, &trait_ref);
                         self.note_version_mismatch(&mut err, &trait_ref);
+                        self.suggest_await_before_try(&mut err, &obligation, &trait_ref, span);
                         if self.suggest_impl_trait(&mut err, span, &obligation, &trait_ref) {
                             err.emit();
                             return;
@@ -1211,7 +1212,6 @@ fn type_category(t: Ty<'_>) -> Option<u32> {
                 ty::Foreign(..) => Some(19),
                 ty::GeneratorWitness(..) => Some(20),
                 ty::Placeholder(..) | ty::Bound(..) | ty::Infer(..) | ty::Error => None,
-                ty::UnnormalizedProjection(..) => bug!("only used with chalk-engine"),
             }
         }
 
@@ -1655,7 +1655,7 @@ fn suggest_unsized_bound_if_applicable(
                     {
                         let (span, separator) = match param.bounds {
                             [] => (span.shrink_to_hi(), ":"),
-                            [.., bound] => (bound.span().shrink_to_hi(), " + "),
+                            [.., bound] => (bound.span().shrink_to_hi(), " +"),
                         };
                         err.span_suggestion_verbose(
                             span,