Skip to content

Commit

Permalink
Fix whitespace in ?Sized structured suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed May 16, 2020
1 parent 31add7e commit 47034db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc_trait_selection/traits/error_reporting/mod.rs
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/unsized3.stderr
Expand Up @@ -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
Expand Down

0 comments on commit 47034db

Please sign in to comment.