mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +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() {}
|