]> git.lizzy.rs Git - rust.git/commit
DSTify [T]/str extension traits
authorJorge Aparicio <japaricious@gmail.com>
Thu, 23 Oct 2014 15:43:18 +0000 (10:43 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Tue, 28 Oct 2014 01:20:08 +0000 (20:20 -0500)
commit94ddb51c9c0a53103dc0c2a4c0260e71f62e6ef8
tree1caa837696e414cc829385da5127f1c3a1fe208b
parentbd7138dd698dde29fb4d7fd34529a863b85d947e
DSTify [T]/str extension traits

This PR changes the signature of several methods from `foo(self, ...)` to
`foo(&self, ...)`/`foo(&mut self, ...)`, but there is no breakage of the usage
of these methods due to the autoref nature of `method.call()`s. This PR also
removes the lifetime parameter from some traits (`Trait<'a>` -> `Trait`). These
changes break any use of the extension traits for generic programming, but
those traits are not meant to be used for generic programming in the first
place. In the whole rust distribution there was only one misuse of a extension
trait as a bound, which got corrected (the bound was unnecessary and got
removed) as part of this PR.

[breaking-change]
src/libcollections/slice.rs
src/libcollections/str.rs
src/libcore/raw.rs
src/libcore/slice.rs
src/libcore/str.rs
src/libstd/ascii.rs
src/libstd/path/posix.rs
src/libunicode/u_str.rs