[][]const u8 is a mutable slice to a unmutable slice of u8s. Since str is a const, you can not use it for a [][]const u8. If func needs to modify the contents of arg, you have to change const str to var str. If func does not need to modify the contents of arg, change to type of arg to []const []const u8.