blob: b315e9bab0d1a81ade3627fef055815d265c94c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//@ run-rustfix
fn foo(x: &str) -> bool {
x.starts_with("hi".to_string() + " you")
//~^ ERROR the trait bound `String: Pattern` is not satisfied [E0277]
}
fn foo2(x: &str) -> bool {
x.starts_with("hi".to_string())
//~^ ERROR the trait bound `String: Pattern` is not satisfied [E0277]
}
fn main() {
foo("hi you");
foo2("hi");
}
|