Yeah, it's fairly new. Maybe 0.14.1?
Those cases are definitely supported. Here's a reasonably faithful re-interpretation of Duff's device which generates the right assembly. If you'll take my word for it, code and assembly equivalent to goto in the middle of a loop body isn't an issue either. The only thing you're losing is the unreadable syntactic interleaving you can do in C.
pub fn copy(T: type, noalias dst: []T, noalias src: []const T, unroll: comptime_int) void {
if (unroll < 2)
@compileError("No-op unrolls not supported");
std.debug.assert(dst.len == src.len);
std.debug.assert(dst.len > 0);
var n: usize = (src.len + unroll - 1) / unroll;
var i: usize = 0;
duff: switch (src.len % unroll) {
inline 0,2...unroll => |x| {
dst[i] = src[i];
i += 1;
continue :duff (unroll + x - 1) % unroll;
},
inline 1 => {
dst[i] = src[i];
i += 1;
n -= 1;
if (n == 0)
break :duff;
continue :duff 0;
},
else => unreachable,
}
}