summaryrefslogtreecommitdiffstats
path: root/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr
blob: e20a0aa0e2aee91cd0beb4c3129a3633db5b2555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error[E0308]: mismatched types
  --> $DIR/wrap-suggestion-privacy.rs:12:19
   |
LL |     needs_wrapper(0);
   |     ------------- ^ expected `Wrapper<i32>`, found integer
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected struct `Wrapper<i32>`
                found type `{integer}`
note: function defined here
  --> $DIR/wrap-suggestion-privacy.rs:5:4
   |
LL | fn needs_wrapper(t: inner::Wrapper<i32>) {}
   |    ^^^^^^^^^^^^^ ----------------------
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)
   |
LL |     needs_wrapper(inner::Wrapper(0));
   |                   +++++++++++++++ +

error[E0308]: mismatched types
  --> $DIR/wrap-suggestion-privacy.rs:17:20
   |
LL |     needs_wrapping(0);
   |     -------------- ^ expected `Wrapping<i32>`, found integer
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected struct `Wrapping<i32>`
                found type `{integer}`
note: function defined here
  --> $DIR/wrap-suggestion-privacy.rs:6:4
   |
LL | fn needs_wrapping(t: std::num::Wrapping<i32>) {}
   |    ^^^^^^^^^^^^^^ --------------------------
help: try wrapping the expression in `std::num::Wrapping`
   |
LL |     needs_wrapping(std::num::Wrapping(0));
   |                    +++++++++++++++++++ +

error[E0308]: mismatched types
  --> $DIR/wrap-suggestion-privacy.rs:22:17
   |
LL |     needs_ready(Some(0));
   |     ----------- ^^^^^^^ expected `Ready<i32>`, found `Option<{integer}>`
   |     |
   |     arguments to this function are incorrect
   |
   = note: expected struct `std::future::Ready<i32>`
                found enum `Option<{integer}>`
note: function defined here
  --> $DIR/wrap-suggestion-privacy.rs:7:4
   |
LL | fn needs_ready(t: std::future::Ready<i32>) {}
   |    ^^^^^^^^^^^ --------------------------

error: aborting due to 3 previous errors

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