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