2023-10-04 20:50:00 -05:00
|
|
|
error[E0277]: expected a `FnMut(char)` closure, found `String`
|
2019-09-15 23:58:20 -05:00
|
|
|
--> $DIR/issue-62843.rs:4:32
|
2019-07-25 12:11:03 -05:00
|
|
|
|
|
|
|
|
LL | println!("{:?}", line.find(pattern));
|
2022-08-18 07:16:35 -05:00
|
|
|
| ---- ^^^^^^^ the trait `Pattern<'_>` is not implemented for `String`
|
2021-09-26 10:50:46 -05:00
|
|
|
| |
|
2021-09-07 06:30:53 -05:00
|
|
|
| required by a bound introduced by this call
|
2019-07-25 12:11:03 -05:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: the trait bound `String: Pattern<'_>` is not satisfied
|
2022-08-15 15:31:37 -05:00
|
|
|
= note: required for `String` to implement `Pattern<'_>`
|
2021-10-05 18:04:09 -05:00
|
|
|
note: required by a bound in `core::str::<impl str>::find`
|
|
|
|
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|
2021-09-26 10:50:46 -05:00
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | println!("{:?}", line.find(&pattern));
|
|
|
|
| +
|
2019-07-25 12:11:03 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-07-25 12:11:03 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|