]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/associated-types-path-2.stderr
New upstream version 1.44.1+dfsg1
[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 help: change the type of the numeric literal from `i32` to `u32`
8 |
9 LL | f1(2i32, 4u32);
10 | ^^^^
11
12 error[E0277]: the trait bound `u32: Foo` is not satisfied
13 --> $DIR/associated-types-path-2.rs:29:5
14 |
15 LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
16 | --- required by this bound in `f1`
17 ...
18 LL | f1(2u32, 4u32);
19 | ^^ the trait `Foo` is not implemented for `u32`
20
21 error[E0277]: the trait bound `u32: Foo` is not satisfied
22 --> $DIR/associated-types-path-2.rs:29:5
23 |
24 LL | f1(2u32, 4u32);
25 | ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u32`
26
27 error[E0277]: the trait bound `u32: Foo` is not satisfied
28 --> $DIR/associated-types-path-2.rs:35:5
29 |
30 LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
31 | --- required by this bound in `f1`
32 ...
33 LL | f1(2u32, 4i32);
34 | ^^ the trait `Foo` is not implemented for `u32`
35
36 error[E0277]: the trait bound `u32: Foo` is not satisfied
37 --> $DIR/associated-types-path-2.rs:35:5
38 |
39 LL | f1(2u32, 4i32);
40 | ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u32`
41
42 error[E0308]: mismatched types
43 --> $DIR/associated-types-path-2.rs:41:18
44 |
45 LL | let _: i32 = f2(2i32);
46 | --- ^^^^^^^^ expected `i32`, found `u32`
47 | |
48 | expected due to this
49 |
50 help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
51 |
52 LL | let _: i32 = f2(2i32).try_into().unwrap();
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
55 error: aborting due to 6 previous errors
56
57 Some errors have detailed explanations: E0277, E0308.
58 For more information about an error, try `rustc --explain E0277`.