]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/associated-types-path-2.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / associated-types / associated-types-path-2.stderr
1 error[E0308]: mismatched types
2 --> $DIR/associated-types-path-2.rs:19:14
3 |
4 LL | f1(2i32, 4i32);
5 | -- ^^^^ expected `u32`, found `i32`
6 | |
7 | arguments to this function are incorrect
8 |
9 note: function defined here
10 --> $DIR/associated-types-path-2.rs:13:8
11 |
12 LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
13 | ^^ -------
14 help: change the type of the numeric literal from `i32` to `u32`
15 |
16 LL | f1(2i32, 4u32);
17 | ~~~
18
19 error[E0277]: the trait bound `u32: Foo` is not satisfied
20 --> $DIR/associated-types-path-2.rs:29:8
21 |
22 LL | f1(2u32, 4u32);
23 | -- ^^^^ the trait `Foo` is not implemented for `u32`
24 | |
25 | required by a bound introduced by this call
26 |
27 = help: the trait `Foo` is implemented for `i32`
28 note: required by a bound in `f1`
29 --> $DIR/associated-types-path-2.rs:13:14
30 |
31 LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
32 | ^^^ required by this bound in `f1`
33
34 error[E0277]: the trait bound `u32: Foo` is not satisfied
35 --> $DIR/associated-types-path-2.rs:29:5
36 |
37 LL | f1(2u32, 4u32);
38 | ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u32`
39 |
40 = help: the trait `Foo` is implemented for `i32`
41
42 error[E0277]: the trait bound `u32: Foo` is not satisfied
43 --> $DIR/associated-types-path-2.rs:29:14
44 |
45 LL | f1(2u32, 4u32);
46 | ^^^^ the trait `Foo` is not implemented for `u32`
47 |
48 = help: the trait `Foo` is implemented for `i32`
49
50 error[E0277]: the trait bound `u32: Foo` is not satisfied
51 --> $DIR/associated-types-path-2.rs:36:8
52 |
53 LL | f1(2u32, 4i32);
54 | -- ^^^^ the trait `Foo` is not implemented for `u32`
55 | |
56 | required by a bound introduced by this call
57 |
58 = help: the trait `Foo` is implemented for `i32`
59 note: required by a bound in `f1`
60 --> $DIR/associated-types-path-2.rs:13:14
61 |
62 LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
63 | ^^^ required by this bound in `f1`
64
65 error[E0277]: the trait bound `u32: Foo` is not satisfied
66 --> $DIR/associated-types-path-2.rs:36:5
67 |
68 LL | f1(2u32, 4i32);
69 | ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u32`
70 |
71 = help: the trait `Foo` is implemented for `i32`
72
73 error[E0277]: the trait bound `u32: Foo` is not satisfied
74 --> $DIR/associated-types-path-2.rs:36:14
75 |
76 LL | f1(2u32, 4i32);
77 | ^^^^ the trait `Foo` is not implemented for `u32`
78 |
79 = help: the trait `Foo` is implemented for `i32`
80
81 error[E0308]: mismatched types
82 --> $DIR/associated-types-path-2.rs:43:18
83 |
84 LL | let _: i32 = f2(2i32);
85 | --- ^^^^^^^^ expected `i32`, found `u32`
86 | |
87 | expected due to this
88 |
89 help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
90 |
91 LL | let _: i32 = f2(2i32).try_into().unwrap();
92 | ++++++++++++++++++++
93
94 error: aborting due to 8 previous errors
95
96 Some errors have detailed explanations: E0277, E0308.
97 For more information about an error, try `rustc --explain E0277`.