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

Make null() and null_mut() const functions #28187

Merged
merged 2 commits into from
Sep 4, 2015
Merged

Conversation

petrochenkov
Copy link
Contributor

And replace more 0 as *const T/0 as *mut Ts with null()/null_mut()s

I'm not sure what is the general policy about making simple functions const, but null() and null_mut() seem to be good candidates.

@rust-highfive
Copy link
Collaborator

r? @aturon

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

@aturon
Copy link
Member

aturon commented Sep 3, 2015

We've been steadily rolling out cases like these. Thanks for the PR!

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 3, 2015

📌 Commit 06fb196 has been approved by aturon

@aturon
Copy link
Member

aturon commented Sep 3, 2015

@bors: rollup

Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 3, 2015
And replace more `0 as *const T`/`0 as *mut T`s with `null()`/`null_mut()`s

I'm not sure what is the general policy about making simple functions `const`, but `null()` and `null_mut()` seem to be good candidates.
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 3, 2015
And replace more `0 as *const T`/`0 as *mut T`s with `null()`/`null_mut()`s

I'm not sure what is the general policy about making simple functions `const`, but `null()` and `null_mut()` seem to be good candidates.
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 3, 2015
bors added a commit that referenced this pull request Sep 3, 2015
@bors bors merged commit 06fb196 into rust-lang:master Sep 4, 2015
@retep998
Copy link
Member

retep998 commented Sep 4, 2015

Oh nice, this will be handy.

@petrochenkov petrochenkov deleted the null branch September 21, 2015 13:04
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