]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-62843.stderr
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / ui / suggestions / issue-62843.stderr
1 error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
2   --> $DIR/issue-62843.rs:4:32
3    |
4 LL |     println!("{:?}", line.find(pattern));
5    |                           ---- ^^^^^^^ expected an implementor of trait `Pattern<'_>`
6    |                           |
7    |                           required by a bound introduced by this call
8    |
9    = note: the trait bound `String: Pattern<'_>` is not satisfied
10    = note: required because of the requirements on the impl of `Pattern<'_>` for `String`
11 note: required by a bound in `core::str::<impl str>::find`
12   --> $SRC_DIR/core/src/str/mod.rs:LL:COL
13    |
14 LL |     pub fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize> {
15    |                        ^^^^^^^^^^^ required by this bound in `core::str::<impl str>::find`
16 help: consider borrowing here
17    |
18 LL |     println!("{:?}", line.find(&pattern));
19    |                                +
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0277`.