rust/tests/ui/suggestions/remove-as_str.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
361 B
Rust
Raw Normal View History

2019-09-24 10:02:21 -05:00
fn foo1(s: &str) {
s.as_str();
//~^ ERROR no method named `as_str` found
2019-09-24 10:02:21 -05:00
}
fn foo2<'a>(s: &'a str) {
s.as_str();
//~^ ERROR no method named `as_str` found
2019-09-24 10:02:21 -05:00
}
fn foo3(s: &mut str) {
s.as_str();
//~^ ERROR no method named `as_str` found
2019-09-24 10:02:21 -05:00
}
fn foo4(s: &&str) {
s.as_str();
//~^ ERROR no method named `as_str` found
2019-09-24 10:02:21 -05:00
}
fn main() {}