Use slicing syntax instead of methods and add a feature gate

cc @aturon 

r? anyone?
If you undo the deprecation, please remove the `ignore` here. (And in general, better to add a silent `#[allow(deprecated)]` but otherwise keep the test.)