]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/wrap-suggestion-privacy.stderr
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / mismatched_types / wrap-suggestion-privacy.stderr
1 error[E0308]: mismatched types
2   --> $DIR/wrap-suggestion-privacy.rs:12:19
3    |
4 LL |     needs_wrapper(0);
5    |     ------------- ^ expected `Wrapper<i32>`, found integer
6    |     |
7    |     arguments to this function are incorrect
8    |
9    = note: expected struct `Wrapper<i32>`
10                 found type `{integer}`
11 note: function defined here
12   --> $DIR/wrap-suggestion-privacy.rs:5:4
13    |
14 LL | fn needs_wrapper(t: inner::Wrapper<i32>) {}
15    |    ^^^^^^^^^^^^^ ----------------------
16 help: try wrapping the expression in `inner::Wrapper` (its field is private, but it's local to this crate and its privacy can be changed)
17    |
18 LL |     needs_wrapper(inner::Wrapper(0));
19    |                   +++++++++++++++ +
20
21 error[E0308]: mismatched types
22   --> $DIR/wrap-suggestion-privacy.rs:17:20
23    |
24 LL |     needs_wrapping(0);
25    |     -------------- ^ expected `Wrapping<i32>`, found integer
26    |     |
27    |     arguments to this function are incorrect
28    |
29    = note: expected struct `Wrapping<i32>`
30                 found type `{integer}`
31 note: function defined here
32   --> $DIR/wrap-suggestion-privacy.rs:6:4
33    |
34 LL | fn needs_wrapping(t: std::num::Wrapping<i32>) {}
35    |    ^^^^^^^^^^^^^^ --------------------------
36 help: try wrapping the expression in `std::num::Wrapping`
37    |
38 LL |     needs_wrapping(std::num::Wrapping(0));
39    |                    +++++++++++++++++++ +
40
41 error[E0308]: mismatched types
42   --> $DIR/wrap-suggestion-privacy.rs:22:17
43    |
44 LL |     needs_ready(Some(0));
45    |     ----------- ^^^^^^^ expected `Ready<i32>`, found `Option<{integer}>`
46    |     |
47    |     arguments to this function are incorrect
48    |
49    = note: expected struct `std::future::Ready<i32>`
50                 found enum `Option<{integer}>`
51 note: function defined here
52   --> $DIR/wrap-suggestion-privacy.rs:7:4
53    |
54 LL | fn needs_ready(t: std::future::Ready<i32>) {}
55    |    ^^^^^^^^^^^ --------------------------
56
57 error: aborting due to 3 previous errors
58
59 For more information about this error, try `rustc --explain E0308`.