about summary refs log tree commit diff
path: root/tests/ui/coercion/coerce-box-new-to-unboxed.stderr
blob: bdd962686e4b46c0832b98b20cd7554d8d31d4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0308]: mismatched types
  --> $DIR/coerce-box-new-to-unboxed.rs:2:21
   |
LL |     let _: String = Box::new(String::new());
   |            ------   ^^^^^^^^^^^^^^^^^^^^^^^ expected `String`, found `Box<String>`
   |            |
   |            expected due to this
   |
   = note: expected struct `String`
              found struct `Box<String>`
help: consider removing the Box
   |
LL -     let _: String = Box::new(String::new());
LL +     let _: String = String::new();
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.