mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
26 lines
516 B
Rust
26 lines
516 B
Rust
// We should not suggest `self` in bare functions.
|
|
// And a note for RFC 1685 should not be shown.
|
|
// See #144968
|
|
|
|
//@ edition:2018
|
|
|
|
fn is_even(value) -> bool { //~ ERROR expected one of `:`, `@`, or `|`, found `)`
|
|
value % 2 == 0
|
|
}
|
|
|
|
struct S;
|
|
|
|
impl S {
|
|
fn is_even(value) -> bool { //~ ERROR expected one of `:`, `@`, or `|`, found `)`
|
|
value % 2 == 0
|
|
}
|
|
}
|
|
|
|
trait T {
|
|
fn is_even(value) -> bool { //~ ERROR expected one of `:`, `@`, or `|`, found `)`
|
|
value % 2 == 0
|
|
}
|
|
}
|
|
|
|
fn main() {}
|