]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/abridged.stderr
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / test / ui / mismatched_types / abridged.stderr
1 error[E0308]: mismatched types
2   --> $DIR/abridged.rs:26:5
3    |
4 26 |     Some(Foo { bar: 1 })
5    |     ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option`
6    |
7    = note: expected type `Foo`
8               found type `std::option::Option<Foo>`
9
10 error[E0308]: mismatched types
11   --> $DIR/abridged.rs:30:5
12    |
13 30 |     Ok(Foo { bar: 1})
14    |     ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result`
15    |
16    = note: expected type `Foo`
17               found type `std::result::Result<Foo, _>`
18
19 error[E0308]: mismatched types
20   --> $DIR/abridged.rs:34:5
21    |
22 34 |     Foo { bar: 1 }
23    |     ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo`
24    |
25    = note: expected type `std::option::Option<Foo>`
26               found type `Foo`
27
28 error[E0308]: mismatched types
29   --> $DIR/abridged.rs:38:5
30    |
31 38 |     Foo { bar: 1 }
32    |     ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo`
33    |
34    = note: expected type `std::result::Result<Foo, Bar>`
35               found type `Foo`
36
37 error[E0308]: mismatched types
38   --> $DIR/abridged.rs:42:5
39    |
40 42 |       X {
41    |  _____^ starting here...
42 43 | |         x: X {
43 44 | |             x: "".to_string(),
44 45 | |             y: 2,
45 46 | |         },
46 47 | |         y: 3,
47 48 | |     }
48    | |_____^ ...ending here: expected struct `std::string::String`, found integral variable
49    |
50    = note: expected type `X<X<_, std::string::String>, std::string::String>`
51               found type `X<X<_, {integer}>, {integer}>`
52
53 error[E0308]: mismatched types
54   --> $DIR/abridged.rs:52:5
55    |
56 52 |       X {
57    |  _____^ starting here...
58 53 | |         x: X {
59 54 | |             x: "".to_string(),
60 55 | |             y: 2,
61 56 | |         },
62 57 | |         y: "".to_string(),
63 58 | |     }
64    | |_____^ ...ending here: expected struct `std::string::String`, found integral variable
65    |
66    = note: expected type `X<X<_, std::string::String>, _>`
67               found type `X<X<_, {integer}>, _>`
68
69 error: aborting due to 6 previous errors
70