Is this a bug in slicing `*const anyopaque` values with `[0..1]`?

My current Zig understanding is

  • The item type of a single-item pointer can’t be noreturn.
  • The item type of an array/slice/many-item-pointer can’t be noreturn and opaque types.

So is it a bug to allow [0..1] slicing on *const anyopaque values?

const print = @import("std").debug.print;

pub fn main() void {
    const v: u8 = 123;
    const p: *const anyopaque = &v;
    const s = p[0..1]; // compiles okay, but a bug?
    print("{}\n", .{ @TypeOf(s) }); // *const [1]anyopaque
    
    const T = *const [1]anyopaque; // error: array of opaque type 'anyopaque' not allowed
    print("{}\n", .{ T });
}

That does look like a bug, yes. Would you mind opening an issue if you can’t find any existing one?

I create an issue here: https://codeberg.org/ziglang/zig/issues/35880