diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-09-25 22:41:49 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-10-02 13:19:45 +1300 |
| commit | df2f1fa7680a86ba228f004e7de731e91a1df1fe (patch) | |
| tree | 8176be0292df7395c72f72588f69b06925a8c7a0 /src/test | |
| parent | 40b9f5ded50ac4ce8c9323921ec556ad611af6b7 (diff) | |
| download | rust-df2f1fa7680a86ba228f004e7de731e91a1df1fe.tar.gz rust-df2f1fa7680a86ba228f004e7de731e91a1df1fe.zip | |
Remove the `_` suffix from slice methods.
Deprecates slicing methods from ImmutableSlice/MutableSlice in favour of slicing syntax or the methods in Slice/SliceMut. Closes #17273.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/slice.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/run-pass/slice.rs b/src/test/run-pass/slice.rs index 39feb075add..661ff055dc2 100644 --- a/src/test/run-pass/slice.rs +++ b/src/test/run-pass/slice.rs @@ -18,38 +18,38 @@ static mut COUNT: uint = 0; struct Foo; impl Slice<Foo, Foo> for Foo { - fn as_slice_<'a>(&'a self) -> &'a Foo { + fn as_slice<'a>(&'a self) -> &'a Foo { unsafe { COUNT += 1; } self } - fn slice_from_<'a>(&'a self, _from: &Foo) -> &'a Foo { + fn slice_from<'a>(&'a self, _from: &Foo) -> &'a Foo { unsafe { COUNT += 1; } self } - fn slice_to_<'a>(&'a self, _to: &Foo) -> &'a Foo { + fn slice_to<'a>(&'a self, _to: &Foo) -> &'a Foo { unsafe { COUNT += 1; } self } - fn slice_<'a>(&'a self, _from: &Foo, _to: &Foo) -> &'a Foo { + fn slice<'a>(&'a self, _from: &Foo, _to: &Foo) -> &'a Foo { unsafe { COUNT += 1; } self } } impl SliceMut<Foo, Foo> for Foo { - fn as_mut_slice_<'a>(&'a mut self) -> &'a mut Foo { + fn as_mut_slice<'a>(&'a mut self) -> &'a mut Foo { unsafe { COUNT += 1; } self } - fn slice_from_mut_<'a>(&'a mut self, _from: &Foo) -> &'a mut Foo { + fn slice_from_mut<'a>(&'a mut self, _from: &Foo) -> &'a mut Foo { unsafe { COUNT += 1; } self } - fn slice_to_mut_<'a>(&'a mut self, _to: &Foo) -> &'a mut Foo { + fn slice_to_mut<'a>(&'a mut self, _to: &Foo) -> &'a mut Foo { unsafe { COUNT += 1; } self } - fn slice_mut_<'a>(&'a mut self, _from: &Foo, _to: &Foo) -> &'a mut Foo { + fn slice_mut<'a>(&'a mut self, _from: &Foo, _to: &Foo) -> &'a mut Foo { unsafe { COUNT += 1; } self } |
