| ... | @@ -250,9 +250,12 @@ pub const fuzz = struct { | ... | @@ -250,9 +250,12 @@ pub const fuzz = struct { |
| 250 | } | 250 | } |
| 251 | // Reject types that don't have a fixed bitsize (esp. usize) | 251 | // Reject types that don't have a fixed bitsize (esp. usize) |
| 252 | // since they are not gauraunteed to fit in a u64 across targets. | 252 | // since they are not gauraunteed to fit in a u64 across targets. |
| 253 | if (std.mem.indexOfScalar(type, &.{ | 253 | // |
| 254 | usize, c_char, c_ushort, c_uint, c_ulong, c_ulonglong, | 254 | // std.mem.indexOfScalar is not used to avoid backward branches |
| 255 | }, T) != null) { | 255 | // and preserve the eval branch quota. |
| | 256 | if (T == usize or T == c_char or T == c_ushort or |
| | 257 | T == c_uint or T == c_ulong or T == c_ulonglong) |
| | 258 | { |
| 256 | @compileError("type does not have a fixed bitsize: " ++ @typeName(T)); | 259 | @compileError("type does not have a fixed bitsize: " ++ @typeName(T)); |
| 257 | } | 260 | } |
| 258 | } | 261 | } |