diff options
| author | Michael Howell <michael@notriddle.com> | 2021-12-06 11:07:34 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2021-12-06 11:16:46 -0700 |
| commit | 6611567f9e253edabcfc38006ef817712f6ce595 (patch) | |
| tree | 404ad58fe9394c2c68d2a75857125d3653164d55 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | 61995926d2bc39e048e3f259cb9363126edbe757 (diff) | |
| download | rust-6611567f9e253edabcfc38006ef817712f6ce595.tar.gz rust-6611567f9e253edabcfc38006ef817712f6ce595.zip | |
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
