004db80afe
This commit changes `AsSlice` to work on unsized types, and changes the `impl` for `&[T]` to `[T]`. Aside from making the trait more general, this also helps some ongoing work with method resolution changes. This is a breaking change: code that uses generics bounded by `AsSlice` will have to change. In particular, such code previously often took arguments of type `V` where `V: AsSlice<T>` by value. These should now be taken by reference: ```rust fn foo<Sized? V: AsSlice<T>>(v: &V) { .. } ``` A few std lib functions have been changed accordingly. [breaking-change] |
||
---|---|---|
.. | ||
collections | ||
io | ||
num | ||
path | ||
rand | ||
rt | ||
sync | ||
sys | ||
time | ||
ascii.rs | ||
bitflags.rs | ||
c_vec.rs | ||
dynamic_lib.rs | ||
error.rs | ||
failure.rs | ||
fmt.rs | ||
hash.rs | ||
lib.rs | ||
macros.rs | ||
os.rs | ||
prelude.rs | ||
rtdeps.rs | ||
task.rs |