zig/doc/langref/test_string_literal_to_const_slice.zig

10 lines
114 B
Zig
Raw Normal View History

fn foo(s: []const u8) void {
_ = s;
}
test "string literal to constant slice" {
foo("hello");
}
// test