Fixes for latest rustc

Main changes are changing statics to consts, also adding the slicing_syntax feature for the tests (along with #![allow(unknown_features)] to match the rest of the code).