diff --git a/src/test/ui/suggestions/issue-62843.stderr b/src/test/ui/suggestions/issue-62843.stderr index 93251b2c8db..29ba39cbe10 100644 --- a/src/test/ui/suggestions/issue-62843.stderr +++ b/src/test/ui/suggestions/issue-62843.stderr @@ -2,14 +2,16 @@ error[E0277]: expected a `FnMut<(char,)>` closure, found `String` --> $DIR/issue-62843.rs:4:32 | LL | println!("{:?}", line.find(pattern)); - | ---- ^^^^^^^ - | | | - | | expected an implementor of trait `Pattern<'_>` - | | help: consider borrowing here: `&pattern` + | ---- ^^^^^^^ expected an implementor of trait `Pattern<'_>` + | | | required by a bound introduced by this call | = note: the trait bound `String: Pattern<'_>` is not satisfied = note: required because of the requirements on the impl of `Pattern<'_>` for `String` +help: consider borrowing here + | +LL | println!("{:?}", line.find(&pattern)); + | + error: aborting due to previous error