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

Replace `0 as *const/mut T` with `ptr::null/null_mut()` #21444

Merged
merged 1 commit into from Jan 22, 2015

Conversation

Projects
None yet
4 participants
@petrochenkov
Copy link
Contributor

petrochenkov commented Jan 20, 2015

Motivation:

  • ptr::null/null_mut() are used more often in the codebase, they are more idiomatic
  • 0 as *const/mut T isn't really a conversion and skews the conversion statistics
  • some people on #rust-internals were in favor of the changes

Drawbacks:

  • More use declarations (but no new inter-crate dependencies)
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 20, 2015

r? @brson

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

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jan 20, 2015

@bors: r+ 2c2480d rollup

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jan 20, 2015

Nice cleanup. Thanks. 🌸

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 21, 2015

rollup merge of rust-lang#21444: petrochenkov/null
Conflicts:
	src/libstd/sync/mpsc/select.rs

@bors bors merged commit 2c2480d into rust-lang:master Jan 22, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@petrochenkov petrochenkov deleted the petrochenkov:null branch May 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.