Skip to content

Commit

Permalink
Rollup merge of #72281 - estebank:fix-ws-sugg, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Fix whitespace in `?Sized` structured suggestion
  • Loading branch information
Dylan-DPC authored May 16, 2020
2 parents 444f449 + 47034db commit 770b1f3
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 770b1f3

Please sign in to comment.