]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/coerce-suggestions.stderr
Auto merge of #81507 - weiznich:add_diesel_to_cargo_test, r=Mark-Simulacrum
[rust.git] / src / test / ui / span / coerce-suggestions.stderr
1 error[E0308]: mismatched types
2   --> $DIR/coerce-suggestions.rs:7:20
3    |
4 LL |     let x: usize = String::new();
5    |            -----   ^^^^^^^^^^^^^ expected `usize`, found struct `String`
6    |            |
7    |            expected due to this
8
9 error[E0308]: mismatched types
10   --> $DIR/coerce-suggestions.rs:9:19
11    |
12 LL |     let x: &str = String::new();
13    |            ----   ^^^^^^^^^^^^^
14    |            |      |
15    |            |      expected `&str`, found struct `String`
16    |            |      help: consider borrowing here: `&String::new()`
17    |            expected due to this
18
19 error[E0308]: mismatched types
20   --> $DIR/coerce-suggestions.rs:12:10
21    |
22 LL |     test(&y);
23    |          ^^ types differ in mutability
24    |
25    = note: expected mutable reference `&mut String`
26                       found reference `&String`
27
28 error[E0308]: mismatched types
29   --> $DIR/coerce-suggestions.rs:14:11
30    |
31 LL |     test2(&y);
32    |           ^^ types differ in mutability
33    |
34    = note: expected mutable reference `&mut i32`
35                       found reference `&String`
36
37 error[E0308]: mismatched types
38   --> $DIR/coerce-suggestions.rs:17:9
39    |
40 LL |     f = box f;
41    |         ^^^^^
42    |         |
43    |         cyclic type of infinite size
44    |         help: try using a conversion method: `(box f).to_string()`
45
46 error[E0308]: mismatched types
47   --> $DIR/coerce-suggestions.rs:21:9
48    |
49 LL |     s = format!("foo");
50    |         ^^^^^^^^^^^^^^ expected `&mut String`, found struct `String`
51    |
52    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
53
54 error: aborting due to 6 previous errors
55
56 For more information about this error, try `rustc --explain E0308`.