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

codegen: Teach bindgen to respect constness of statics. #1427

Merged
merged 2 commits into from Oct 22, 2018

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Oct 20, 2018

const extern struct Foo gFoo;

Should never generate a static mut.

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@emilio
Copy link
Contributor Author

emilio commented Oct 20, 2018

r? @fitzgen or @pepyakin

@emilio
Copy link
Contributor Author

emilio commented Oct 22, 2018

I really need this for a thing I'm working on in Gecko, so I think I'm going to land this. Hopefully it looks uncontroversial :)

@bors-servo
Copy link

📌 Commit 710cbc0 has been approved by emilio

@highfive highfive assigned emilio and unassigned fitzgen Oct 22, 2018
@bors-servo
Copy link

💡 This pull request was already approved, no need to approve it again.

bors-servo pushed a commit that referenced this pull request Oct 22, 2018
codegen: Teach bindgen to respect constness of statics.

```c
const extern struct Foo gFoo;
```

Should never generate a `static mut`.
@bors-servo
Copy link

⌛ Testing commit 710cbc0 with merge 0d0a245...

@bors-servo
Copy link

📌 Commit 710cbc0 has been approved by emilio

@emilio emilio merged commit a242c51 into rust-lang:master Oct 22, 2018
bors-servo pushed a commit that referenced this pull request Oct 22, 2018
codegen: Teach bindgen to respect constness of statics.

```c
const extern struct Foo gFoo;
```

Should never generate a `static mut`.
@bors-servo
Copy link

⌛ Testing commit 710cbc0 with merge 16839fa...

@emilio emilio deleted the const-static branch October 22, 2018 07:13
@bors-servo
Copy link

💥 Test timed out

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.

None yet

4 participants