rust/compiler/rustc_parse
Michael Howell 6611567f9e Expect extern fn with no body when parsing
Also add a test case for inserting a semicolon on extern fns.

Without this fix, we got an error like this:

    error: expected one of `->`, `where`, or `{`, found `}`
     --> chk.rs:3:1
      |
    2 |   fn foo()
      |      ---  - expected one of `->`, `where`, or `{`
      |      |
      |      while parsing this `fn`
    3 | }
      | ^ unexpected token

Since this is inside an extern block, you're required to write function
prototypes with no body. This fixes a regression, and adds a test case
for it.
2021-12-06 11:16:46 -07:00
..
src Expect extern fn with no body when parsing 2021-12-06 11:16:46 -07:00
Cargo.toml Lint against RTL unicode codepoints in literals and comments 2021-10-31 13:14:04 +01:00