summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/remove-as_str.rs
blob: 289a784ba6af35129a3a2450838a087bb68ee23e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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() {}