Skip to content

Commit 47034db

Browse files
committed
Fix whitespace in ?Sized structured suggestion
1 parent 31add7e commit 47034db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_trait_selection/traits/error_reporting/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
16551655
{
16561656
let (span, separator) = match param.bounds {
16571657
[] => (span.shrink_to_hi(), ":"),
1658-
[.., bound] => (bound.span().shrink_to_hi(), " + "),
1658+
[.., bound] => (bound.span().shrink_to_hi(), " +"),
16591659
};
16601660
err.span_suggestion_verbose(
16611661
span,

src/test/ui/unsized3.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ LL | fn f4<X: T>(x: &X) {
3131
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3232
help: consider relaxing the implicit `Sized` restriction
3333
|
34-
LL | fn f4<X: T + ?Sized>(x: &X) {
35-
| ^^^^^^^^^
34+
LL | fn f4<X: T + ?Sized>(x: &X) {
35+
| ^^^^^^^^
3636

3737
error[E0277]: the size for values of type `X` cannot be known at compilation time
3838
--> $DIR/unsized3.rs:33:8

0 commit comments

Comments
 (0)