about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-11-04 15:31:46 -0800
committerAaron Turon <aturon@mozilla.com>2014-11-20 00:05:00 -0800
commit004db80afe08b28d79741c486ceb8398e6725829 (patch)
treed365766bb4558d1339ad6bbbef51ea6e969a9304 /src/rustllvm/RustWrapper.cpp
parent793624261a221aa4592381fa8067e1f597b90c22 (diff)
downloadrust-004db80afe08b28d79741c486ceb8398e6725829.tar.gz
rust-004db80afe08b28d79741c486ceb8398e6725829.zip
libcore: DST-ify AsSlice
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]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions