mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
20 lines
534 B
Rust
20 lines
534 B
Rust
struct Foo;
|
|
|
|
impl Foo {
|
|
fn bar(self) {}
|
|
}
|
|
|
|
fn main() {
|
|
let x = cmp(&1, &2);
|
|
//~^ ERROR cannot find function `cmp` in this scope
|
|
//~| HELP use the `.` operator to call the method `Ord::cmp` on `&{integer}`
|
|
|
|
let y = len([1, 2, 3]);
|
|
//~^ ERROR cannot find function `len` in this scope
|
|
//~| HELP use the `.` operator to call the method `len` on `&[{integer}]`
|
|
|
|
let z = bar(Foo);
|
|
//~^ ERROR cannot find function `bar` in this scope
|
|
//~| HELP use the `.` operator to call the method `bar` on `Foo`
|
|
}
|