From c367d1dfdba783b8eb171cdfec5d9de0188517c5 Mon Sep 17 00:00:00 2001 From: Federico Lorenzi Date: Mon, 23 Oct 2023 13:15:37 +0200 Subject: [PATCH] Tidy: add std hasUniqueRepresentation to banned list --- src/tidy.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tidy.zig b/src/tidy.zig index 75e2f0d976..906a9bc656 100644 --- a/src/tidy.zig +++ b/src/tidy.zig @@ -64,6 +64,11 @@ fn banned(source: []const u8) ?[]const u8 { if (std.mem.indexOf(u8, source, "std." ++ "BoundedArray") != null) { return "use stdx." ++ "BoundedArray instead of std version"; } + + if (std.mem.indexOf(u8, source, "trait." ++ "hasUniqueRepresentation") != null) { + return "use stdx." ++ "hasUniqueRepresentation instead of std version"; + } + return null; }