mirror of
https://github.com/rust-lang/rust
synced 2024-10-01 06:14:33 +00:00
Fix whitespace in ?Sized
structured suggestion
This commit is contained in:
parent
31add7e607
commit
47034db851
|
@ -1655,7 +1655,7 @@ fn suggest_unsized_bound_if_applicable(
|
|||
{
|
||||
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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue