]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #40815 - estebank:issue-40006, r=GuillaumeGomez
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>
Wed, 5 Apr 2017 23:01:06 +0000 (23:01 +0000)
committerGitHub <noreply@github.com>
Wed, 5 Apr 2017 23:01:06 +0000 (23:01 +0000)
commitcee05080219bde70125882ef32c0a882544b9f50
treef918f3255ceb45636d37a3d4ebb850773449aa78
parenta18202792ad4f64ba8762544899cac827ac1d5cd
parent8f31e191c6caa1986276f2dda207135a255ee1f6
Rollup merge of #40815 - estebank:issue-40006, r=GuillaumeGomez

Identify missing item category in `impl`s

```rust
struct S;
impl S {
    pub hello_method(&self) {
        println!("Hello");
    }
}
fn main() { S.hello_method(); }
```

```rust
error: missing `fn` for method declaration
 --> file.rs:3:4
  |
3 |     pub hello_method(&self) {
  |        ^ missing `fn`
```

Fix #40006. r? @pnkfelix CC @jonathandturner @GuillaumeGomez
src/libsyntax/parse/parser.rs
src/libsyntax_pos/lib.rs