@@ -31,24 +31,21 @@ note: required by a bound in `f1`
31
31
LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
32
32
| ^^^ required by this bound in `f1`
33
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
34
error[E0277]: the trait bound `u32: Foo` is not satisfied
43
35
--> $DIR/associated-types-path-2.rs:29:14
44
36
|
45
37
LL | f1(2u32, 4u32);
46
38
| ^^^^ the trait `Foo` is not implemented for `u32`
47
39
|
48
40
= help: the trait `Foo` is implemented for `i32`
41
+ = help: unsized fn params are gated as an unstable feature
42
+ help: function arguments must have a statically known size, borrowed types always have a known size
43
+ |
44
+ LL | f1(2u32, &4u32);
45
+ | +
49
46
50
47
error[E0277]: the trait bound `u32: Foo` is not satisfied
51
- --> $DIR/associated-types-path-2.rs:36 :8
48
+ --> $DIR/associated-types-path-2.rs:35 :8
52
49
|
53
50
LL | f1(2u32, 4i32);
54
51
| -- ^^^^ the trait `Foo` is not implemented for `u32`
@@ -63,23 +60,20 @@ LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
63
60
| ^^^ required by this bound in `f1`
64
61
65
62
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
63
+ --> $DIR/associated-types-path-2.rs:35:14
75
64
|
76
65
LL | f1(2u32, 4i32);
77
66
| ^^^^ the trait `Foo` is not implemented for `u32`
78
67
|
79
68
= help: the trait `Foo` is implemented for `i32`
69
+ = help: unsized fn params are gated as an unstable feature
70
+ help: function arguments must have a statically known size, borrowed types always have a known size
71
+ |
72
+ LL | f1(2u32, &4i32);
73
+ | +
80
74
81
75
error[E0308]: mismatched types
82
- --> $DIR/associated-types-path-2.rs:43 :18
76
+ --> $DIR/associated-types-path-2.rs:41 :18
83
77
|
84
78
LL | let _: i32 = f2(2i32);
85
79
| --- ^^^^^^^^ expected `i32`, found `u32`
@@ -91,7 +85,7 @@ help: you can convert a `u32` to an `i32` and panic if the converted value doesn
91
85
LL | let _: i32 = f2(2i32).try_into().unwrap();
92
86
| ++++++++++++++++++++
93
87
94
- error: aborting due to 8 previous errors
88
+ error: aborting due to 6 previous errors
95
89
96
90
Some errors have detailed explanations: E0277, E0308.
97
91
For more information about an error, try `rustc --explain E0277`.
0 commit comments