Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: do not try to continue with unsafe on foreign fns #33336

Merged
merged 1 commit into from
May 7, 2016

Conversation

birkenfeld
Copy link
Contributor

The changed line makes it look like unsafe is allowed, but the first statement of parse_item_foreign_fn is:

self.expect_keyword(keywords::Fn)?;

So we get the strange "expected one of fn, pub, static, or unsafe, found unsafe".

Fixes: #27361

@rust-highfive
Copy link
Collaborator

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@oli-obk
Copy link
Contributor

oli-obk commented May 2, 2016

you need to update the parse-fail/extern-no-fn.rs and parse-fail/removed-syntax-extern-const.rs tests

@birkenfeld
Copy link
Contributor Author

Thanks! I'll freely admit I didn't want to wait for the tests locally to find these :)

The changed line makes it look like `unsafe` is allowed, but the
first statement of `parse_item_foreign_fn` is:

`self.expect_keyword(keywords::Fn)?;`

So we get the strange "expected one of `fn`, `pub`, `static`, or
`unsafe`, found `unsafe`".

Fixes: rust-lang#27361
@oli-obk
Copy link
Contributor

oli-obk commented May 2, 2016

Yea, it would be great if we got emails from travis...

@sfackler
Copy link
Member

sfackler commented May 2, 2016

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 2, 2016

📌 Commit b75f81c has been approved by sfackler

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 5, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 5, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 5, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 6, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 7, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 7, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 7, 2016
parser: do not try to continue with `unsafe` on foreign fns

The changed line makes it look like `unsafe` is allowed, but the first statement of `parse_item_foreign_fn` is:

```
self.expect_keyword(keywords::Fn)?;
```

So we get the strange "expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`".

Fixes: rust-lang#27361
bors added a commit that referenced this pull request May 7, 2016
@bors bors merged commit b75f81c into rust-lang:master May 7, 2016
@birkenfeld birkenfeld deleted the issue-27361 branch May 7, 2016 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants