about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-21 22:21:37 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-23 10:03:43 -0700
commit2b2d1e14c97b7692debf62dd2739049f1f377a5e (patch)
treea7bfb98bc1e31c71e1a1fadfd4896b3dda9a52a1 /src/rustllvm/RustWrapper.cpp
parentf4083a22451692b9ae360f3d12bfb8cb52b096e4 (diff)
downloadrust-2b2d1e14c97b7692debf62dd2739049f1f377a5e.tar.gz
rust-2b2d1e14c97b7692debf62dd2739049f1f377a5e.zip
std: Change CharEq to take `&mut self`
This is similar to the previous commits to allow invocation of a closure through
a `&mut self` pointer because `&self` is disallowed. One of the primary
implementors of the CharEq trait is a closure type, which would not work if the
method continued to have `&self`.

In addition to changing mutability of the `matches` method, this modifies the
following methods from &CharEq to take a type which implements CharEq by value.

* trim_chars
* trim_left_chars
* trim_right_chars

Where these methods were previously invoked via

    s.trim_chars(&'a')

it would now be invoked through

    s.trim_chars('a')

[breaking-change]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions