about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-11-07 20:55:01 +0000
committerbors <bors@rust-lang.org>2017-11-07 20:55:01 +0000
commitee2286149a5f0b148334841d4f067dc819dcca3b (patch)
tree5b4b0668d459e417c61355d519ff3675b6ec80a5 /src/rustllvm/RustWrapper.cpp
parent7f6417e9b72de63666fd92caf1a6b96a778b60ed (diff)
parent604f049cd5060129cf14f7bd340d442811345ea8 (diff)
downloadrust-ee2286149a5f0b148334841d4f067dc819dcca3b.tar.gz
rust-ee2286149a5f0b148334841d4f067dc819dcca3b.zip
Auto merge of #44932 - cuviper:unsized-ptr-is_null, r=alexcrichton
Remove `T: Sized` on pointer `as_ref()` and `as_mut()`

`NonZero::is_zero()` was already casting all pointers to thin `*mut u8` to check for null.  The same test on unsized fat pointers can also be used with `as_ref()` and `as_mut()` to get fat references.

(This PR formerly changed `is_null()` too, but checking just the data pointer is not obviously correct for trait objects, especially if `*const self` sorts of methods are ever allowed.)
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions