2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the trait bound `&String: SomeTrait` is not satisfied
|
2021-02-08 22:15:45 +00:00
|
|
|
--> $DIR/issue-62530.rs:13:26
|
2020-06-20 10:30:12 +00:00
|
|
|
|
|
|
|
|
LL | takes_type_parameter(&string); // Error
|
2022-08-20 06:54:39 +00:00
|
|
|
| -------------------- ^^^^^^^ the trait `SomeTrait` is not implemented for `&String`
|
|
|
|
| |
|
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 `takes_type_parameter`
|
|
|
|
--> $DIR/issue-62530.rs:4:44
|
|
|
|
|
|
|
|
|
LL | fn takes_type_parameter<T>(_x: T) where T: SomeTrait {}
|
|
|
|
| ^^^^^^^^^ required by this bound in `takes_type_parameter`
|
2022-08-20 06:54:39 +00:00
|
|
|
help: consider dereferencing here
|
|
|
|
|
|
|
|
|
LL | takes_type_parameter(&*string); // Error
|
|
|
|
| +
|
2020-06-20 10:30:12 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2020-06-20 10:30:12 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|