about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2017-10-10 11:35:41 -0700
committerJosh Stone <jistone@redhat.com>2017-10-10 11:35:41 -0700
commit604f049cd5060129cf14f7bd340d442811345ea8 (patch)
tree63f8e90d66dc57fbae77142dc618feb61236fbf2 /src/rustllvm/RustWrapper.cpp
parent40a678d8dbaea49a2e9f5451f4db68359a09f67a (diff)
downloadrust-604f049cd5060129cf14f7bd340d442811345ea8.tar.gz
rust-604f049cd5060129cf14f7bd340d442811345ea8.zip
Restore `T: Sized` on `ptr::is_null`
The exact semantics of `is_null` on unsized pointers are still debatable,
especially for trait objects.  It may be legal to call `*mut self`
methods on a trait object someday, as with Go interfaces, so `is_null`
might need to validate the vtable pointer too.

For `as_ref` and `as_mut`, we're assuming that you cannot have a non-null
data pointer with a null vtable, so casting the unsized check is fine.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions