fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB37 linesraw
1error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
2  --> $DIR/issue-104961.rs:4:19
3   |
4LL |     x.starts_with("hi".to_string() + " you")
5   |       ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Pattern<'_>` is not implemented for `String`
6   |       |
7   |       required by a bound introduced by this call
8   |
9   = note: the trait bound `String: Pattern<'_>` is not satisfied
10   = note: required for `String` to implement `Pattern<'_>`
11note: required by a bound in `core::str::<impl str>::starts_with`
12  --> $SRC_DIR/core/src/str/mod.rs:LL:COL
13help: consider borrowing here
14   |
15LL |     x.starts_with(&("hi".to_string() + " you"))
16   |                   ++                         +
17
18error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
19  --> $DIR/issue-104961.rs:9:19
20   |
21LL |     x.starts_with("hi".to_string())
22   |       ----------- ^^^^^^^^^^^^^^^^ the trait `Pattern<'_>` is not implemented for `String`
23   |       |
24   |       required by a bound introduced by this call
25   |
26   = note: the trait bound `String: Pattern<'_>` is not satisfied
27   = note: required for `String` to implement `Pattern<'_>`
28note: required by a bound in `core::str::<impl str>::starts_with`
29  --> $SRC_DIR/core/src/str/mod.rs:LL:COL
30help: consider borrowing here
31   |
32LL |     x.starts_with(&"hi".to_string())
33   |                   +
34
35error: aborting due to 2 previous errors
36
37For more information about this error, try `rustc --explain E0277`.