diff options
| -rw-r--r-- | src/librustc_trait_selection/traits/error_reporting/mod.rs | 2 | ||||
| -rw-r--r-- | 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 6bd4455e1e3..0d53df3bf4b 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 cf8459609b6..828e8bc9f4a 100644 --- a/src/test/ui/unsized3.stderr +++ b/src/test/ui/unsized3.stderr @@ -31,8 +31,8 @@ LL | fn f4<X: T>(x: &X) { = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> help: consider relaxing the implicit `Sized` restriction | -LL | fn f4<X: T + ?Sized>(x: &X) { - | ^^^^^^^^^ +LL | fn f4<X: T + ?Sized>(x: &X) { + | ^^^^^^^^ error[E0277]: the size for values of type `X` cannot be known at compilation time --> $DIR/unsized3.rs:33:8 |
