Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
petrochenkov:null
Sep 4, 2015
Merged

Make null() and null_mut() const functions#28187
bors merged 2 commits into
rust-lang:masterfrom
petrochenkov:null

Conversation

@petrochenkov
Copy link
Copy Markdown
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
Copy Markdown
Contributor

r? @aturon

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

@aturon
Copy link
Copy Markdown
Contributor

aturon commented Sep 3, 2015

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

@bors: r+

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 3, 2015

📌 Commit 06fb196 has been approved by aturon

@aturon
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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