From 47034db8510ec4ea2a82ce3b8779b3b4816b1134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 16 May 2020 12:56:21 -0700 Subject: [PATCH] Fix whitespace in `?Sized` structured suggestion --- src/librustc_trait_selection/traits/error_reporting/mod.rs | 2 +- src/test/ui/unsized3.stderr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_trait_selection/traits/error_reporting/mod.rs b/src/librustc_trait_selection/traits/error_reporting/mod.rs index 6bd4455e1e3fd..0d53df3bf4b46 100644 --- a/src/librustc_trait_selection/traits/error_reporting/mod.rs +++ b/src/librustc_trait_selection/traits/error_reporting/mod.rs @@ -1655,7 +1655,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> { { 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, diff --git a/src/test/ui/unsized3.stderr b/src/test/ui/unsized3.stderr index cf8459609b691..828e8bc9f4aa1 100644 --- a/src/test/ui/unsized3.stderr +++ b/src/test/ui/unsized3.stderr @@ -31,8 +31,8 @@ LL | fn f4(x: &X) { = note: to learn more, visit help: consider relaxing the implicit `Sized` restriction | -LL | fn f4(x: &X) { - | ^^^^^^^^^ +LL | fn f4(x: &X) { + | ^^^^^^^^ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:33:8