mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
22 lines
361 B
Rust
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() {}
|