diff options
Diffstat (limited to 'src/test/ui/str/str-array-assignment.stderr')
| -rw-r--r-- | src/test/ui/str/str-array-assignment.stderr | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/ui/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr index d3bff008722..87809d212d7 100644 --- a/src/test/ui/str/str-array-assignment.stderr +++ b/src/test/ui/str/str-array-assignment.stderr @@ -1,8 +1,10 @@ error[E0308]: if and else have incompatible types - --> $DIR/str-array-assignment.rs:3:11 + --> $DIR/str-array-assignment.rs:3:37 | LL | let t = if true { s[..2] } else { s }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found &str + | ------ ^ expected str, found &str + | | + | expected because of this | = note: expected type `str` found type `&str` @@ -28,7 +30,7 @@ LL | let v = s[..2]; | doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` - = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> + = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature |
