std: fix compile errors caught by stage2 AstGen

* `comptime const` is redundant
 * don't use `extern enum`; specify a tag type.
   `extern enum` is only when you need tags to alias. But aliasing tags
   is a smell. I will be making a proposal shortly to remove `extern enum`
   from the language.
 * there is no such thing as `packed enum`.
 * instead of `catch |_|`, omit the capture entirely.
 * unused function definition with missing parameter name
 * using `try` outside of a function or test
This commit is contained in:
Andrew Kelley
2021-04-22 18:07:46 -07:00
parent 7c453b91b8
commit 507a8096d2
40 changed files with 101 additions and 103 deletions

View File

@@ -1310,7 +1310,7 @@ test "reIndex" {
}
test "fromOwnedArrayList" {
comptime const array_hash_map_type = AutoArrayHashMap(i32, i32);
const array_hash_map_type = AutoArrayHashMap(i32, i32);
var al = std.ArrayListUnmanaged(array_hash_map_type.Entry){};
const hash = getAutoHashFn(i32);