Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
//@ 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())
fn main() {
foo("hi you");
foo2("hi");