2021-05-17 20:58:09 +00:00
|
|
|
error[E0277]: the trait bound `i32: Tr` is not satisfied
|
|
|
|
--> $DIR/issue-84973-negative.rs:10:9
|
|
|
|
|
|
|
|
|
LL | bar(a);
|
2021-09-07 11:30:53 +00:00
|
|
|
| --- ^ the trait `Tr` is not implemented for `i32`
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2021-07-31 16:26:55 +00:00
|
|
|
|
|
2021-12-13 20:56:40 +00:00
|
|
|
= help: the trait `Tr` is implemented for `&f32`
|
2021-07-31 16:26:55 +00:00
|
|
|
note: required by a bound in `bar`
|
|
|
|
--> $DIR/issue-84973-negative.rs:5:11
|
|
|
|
|
|
|
|
|
LL | fn bar<T: Tr>(t: T) {}
|
|
|
|
| ^^ required by this bound in `bar`
|
2021-05-17 20:58:09 +00:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `f32: Tr` is not satisfied
|
|
|
|
--> $DIR/issue-84973-negative.rs:11:9
|
|
|
|
|
|
|
|
|
LL | bar(b);
|
2022-08-18 12:16:35 +00:00
|
|
|
| --- ^ the trait `Tr` is not implemented for `f32`
|
2021-09-26 15:30:39 +00:00
|
|
|
| |
|
2021-09-07 11:30:53 +00:00
|
|
|
| required by a bound introduced by this call
|
2021-07-31 16:26:55 +00:00
|
|
|
|
|
|
|
|
note: required by a bound in `bar`
|
|
|
|
--> $DIR/issue-84973-negative.rs:5:11
|
|
|
|
|
|
|
|
|
LL | fn bar<T: Tr>(t: T) {}
|
|
|
|
| ^^ required by this bound in `bar`
|
2021-09-26 15:30:39 +00:00
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | bar(&b);
|
|
|
|
| +
|
2021-05-17 20:58:09 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|