rust/src/libcoretest
Andrew Poelstra 00ff5aac4e Rename RawPtr::to_option() to RawPtr::as_ref()
As outlined in

  https://aturon.github.io/style/naming/conversions.html

`to_` functions names should only be used for expensive operations.
Thus `to_option` is better named `as_option`. Also, putting type
names into method names is considered bad style; what the user is
really trying to get is a reference. This `as_ref` is even better.

Also, we are missing a mutable version of this method. So add a
new trait `RawMutPtr` with a corresponding `as_mut` methode.

Finally, there is a bug in the signature of `to_option` which has
been around since lifetime elision: originally the returned reference
had 'static lifetime, but since the elision changes this become
the lifetime of the raw pointer (which does not make sense, since
the pointer lifetime and referent lifetime are unrelated). Fix
the bug to return a reference with a fresh lifetime (which will
be inferred from the calling context).

[breaking-change]
2014-08-31 13:33:55 -05:00
..
fmt
num Change Shl<T, T> for Int to Shl<uint, T> 2014-07-04 09:57:04 +01:00
any.rs
atomic.rs stabilize atomics (now atomic) 2014-08-04 16:03:21 -07:00
cell.rs
char.rs Optimized IR generation for UTF-8 and UTF-16 encoding 2014-08-16 21:13:39 +02:00
clone.rs
cmp.rs core: add a reverse method to Ordering. 2014-08-03 11:50:19 +10:00
finally.rs
iter.rs Rebasing changes 2014-08-26 16:07:32 +12:00
lib.rs Add a test for the fix of issue 16589 2014-08-19 00:37:34 -04:00
mem.rs
ops.rs
option.rs Fallout from stabilizing core::option 2014-08-28 09:12:54 -07:00
ptr.rs Rename RawPtr::to_option() to RawPtr::as_ref() 2014-08-31 13:33:55 -05:00
raw.rs
result.rs
slice.rs core: Add binary_search and binary_search_elem methods to slices. 2014-08-13 11:30:15 -07:00
str.rs Fix TwoWaySearcher to work when used with periodic needles. 2014-08-20 02:51:22 -04:00
tuple.rs