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