We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f607ff6 + 3829f52 commit a9c4392Copy full SHA for a9c4392
src/slice.rs
@@ -612,6 +612,8 @@ macro_rules! s(
612
(@convert $r:expr, $s:expr) => {
613
<$crate::SliceOrIndex as ::std::convert::From<_>>::from($r).step_by($s as isize)
614
};
615
+ // Catch-all clause for syntax errors
616
+ (@parse $($t:tt)*) => { compile_error!("Invalid syntax in s![], expected at least one index or range") };
617
($($t:tt)*) => {
618
// The extra `*&` is a workaround for this compiler bug:
619
// https://github.com/rust-lang/rust/issues/23014
0 commit comments