blob: d10300b48ba1e8c81810ef01dfffe2cdf9f8c4ac (
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 for type `&str` in the current scope
}
fn foo2<'a>(s: &'a str) {
s.as_str();
//~^ ERROR no method named `as_str` found for type `&'a str` in the current scope
}
fn foo3(s: &mut str) {
s.as_str();
//~^ ERROR no method named `as_str` found for type `&mut str` in the current scope
}
fn foo4(s: &&str) {
s.as_str();
//~^ ERROR no method named `as_str` found for type `&&str` in the current scope
}
fn main() {}
|