mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
fix test error
This commit is contained in:
parent
620f480e64
commit
3e41397ef2
@ -2,14 +2,16 @@ error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
|
|||||||
--> $DIR/issue-62843.rs:4:32
|
--> $DIR/issue-62843.rs:4:32
|
||||||
|
|
|
|
||||||
LL | println!("{:?}", line.find(pattern));
|
LL | println!("{:?}", line.find(pattern));
|
||||||
| ---- ^^^^^^^
|
| ---- ^^^^^^^ expected an implementor of trait `Pattern<'_>`
|
||||||
| | |
|
| |
|
||||||
| | expected an implementor of trait `Pattern<'_>`
|
|
||||||
| | help: consider borrowing here: `&pattern`
|
|
||||||
| required by a bound introduced by this call
|
| required by a bound introduced by this call
|
||||||
|
|
|
|
||||||
= note: the trait bound `String: Pattern<'_>` is not satisfied
|
= note: the trait bound `String: Pattern<'_>` is not satisfied
|
||||||
= note: required because of the requirements on the impl of `Pattern<'_>` for `String`
|
= 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
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user