aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_string_literal_to_slice.zig
blob: d33087ff24952cc06e88bb835903c7eaedc32aa2 (plain)
1
2
3
4
5
6
7
8
9
fn foo(s: []u8) void {
    _ = s;
}

test "string literal to mutable slice" {
    foo("hello");
}

// test_error=expected type '[]u8', found '*const [5:0]u8'