rust/src/test/ui/suggestions/remove-as_str.rs
2020-01-08 08:05:31 -08:00

22 lines
361 B
Rust

fn foo1(s: &str) {
s.as_str();
//~^ ERROR no method named `as_str` found
}
fn foo2<'a>(s: &'a str) {
s.as_str();
//~^ ERROR no method named `as_str` found
}
fn foo3(s: &mut str) {
s.as_str();
//~^ ERROR no method named `as_str` found
}
fn foo4(s: &&str) {
s.as_str();
//~^ ERROR no method named `as_str` found
}
fn main() {}