| author | |
| committer | |
| log | d3d24874c91054a70c706fed47278c81c9ce890a |
| tree | 6ee731cf3c9acaac8292bd2701cafc6dee9e0d4d |
| parent | 7b32aacbafda2946c67ff4d4b329cdededf1da29 |
See #381116 files changed, 8 insertions(+), 94 deletions(-)
lib/std/array_hash_map.zig-4| ... | ... | @@ -201,8 +201,6 @@ pub fn ArrayHashMap( |
| 201 | 201 | return self.unmanaged.getOrPutValueContext(self.allocator, key, value, self.ctx); |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 205 | ||
| 206 | 204 | /// Increases capacity, guaranteeing that insertions up until the |
| 207 | 205 | /// `expected_count` will not cause an allocation, and therefore cannot fail. |
| 208 | 206 | pub fn ensureTotalCapacity(self: *Self, new_capacity: usize) !void { |
| ... | ... | @@ -755,8 +753,6 @@ pub fn ArrayHashMapUnmanaged( |
| 755 | 753 | return res; |
| 756 | 754 | } |
| 757 | 755 | |
| 758 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 759 | ||
| 760 | 756 | /// Increases capacity, guaranteeing that insertions up until the |
| 761 | 757 | /// `expected_count` will not cause an allocation, and therefore cannot fail. |
| 762 | 758 | pub fn ensureTotalCapacity(self: *Self, allocator: Allocator, new_capacity: usize) !void { |
lib/std/array_list.zig-6| ... | ... | @@ -83,8 +83,6 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 83 | 83 | }; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | pub const toUnmanaged = @compileError("deprecated; use `moveToUnmanaged` which has different semantics."); | |
| 87 | ||
| 88 | 86 | /// Initializes an ArrayListUnmanaged with the `items` and `capacity` fields |
| 89 | 87 | /// of this ArrayList. Empties this ArrayList. |
| 90 | 88 | pub fn moveToUnmanaged(self: *Self) ArrayListAlignedUnmanaged(T, alignment) { |
| ... | ... | @@ -325,8 +323,6 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type { |
| 325 | 323 | self.capacity = 0; |
| 326 | 324 | } |
| 327 | 325 | |
| 328 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 329 | ||
| 330 | 326 | /// Modify the array so that it can hold at least `new_capacity` items. |
| 331 | 327 | /// Invalidates pointers if additional memory is needed. |
| 332 | 328 | pub fn ensureTotalCapacity(self: *Self, new_capacity: usize) Allocator.Error!void { |
| ... | ... | @@ -721,8 +717,6 @@ pub fn ArrayListAlignedUnmanaged(comptime T: type, comptime alignment: ?u29) typ |
| 721 | 717 | self.capacity = 0; |
| 722 | 718 | } |
| 723 | 719 | |
| 724 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 725 | ||
| 726 | 720 | /// Modify the array so that it can hold at least `new_capacity` items. |
| 727 | 721 | /// Invalidates pointers if additional memory is needed. |
| 728 | 722 | pub fn ensureTotalCapacity(self: *Self, allocator: Allocator, new_capacity: usize) Allocator.Error!void { |
lib/std/base64.zig-4| ... | ... | @@ -69,10 +69,6 @@ pub const url_safe_no_pad = Codecs{ |
| 69 | 69 | .Decoder = Base64Decoder.init(url_safe_alphabet_chars, null), |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | pub const standard_pad_char = @compileError("deprecated; use standard.pad_char"); | |
| 73 | pub const standard_encoder = @compileError("deprecated; use standard.Encoder"); | |
| 74 | pub const standard_decoder = @compileError("deprecated; use standard.Decoder"); | |
| 75 | ||
| 76 | 72 | pub const Base64Encoder = struct { |
| 77 | 73 | alphabet_chars: [64]u8, |
| 78 | 74 | pad_char: ?u8, |
lib/std/build.zig+4-26| ... | ... | @@ -1339,13 +1339,6 @@ test "builder.findProgram compiles" { |
| 1339 | 1339 | _ = builder.findProgram(&[_][]const u8{}, &[_][]const u8{}) catch null; |
| 1340 | 1340 | } |
| 1341 | 1341 | |
| 1342 | /// TODO: propose some kind of `@deprecate` builtin so that we can deprecate | |
| 1343 | /// this while still having somewhat non-lazy decls. In this file we wanted to do | |
| 1344 | /// refAllDecls for example which makes it trigger `@compileError` if you try | |
| 1345 | /// to use that strategy. | |
| 1346 | pub const Version = @compileError("deprecated; Use `std.builtin.Version`"); | |
| 1347 | pub const Target = @compileError("deprecated; Use `std.zig.CrossTarget`"); | |
| 1348 | ||
| 1349 | 1342 | pub const Pkg = struct { |
| 1350 | 1343 | name: []const u8, |
| 1351 | 1344 | source: FileSource, |
| ... | ... | @@ -2314,29 +2307,19 @@ pub const LibExeObjStep = struct { |
| 2314 | 2307 | self.linkLibraryOrObject(obj); |
| 2315 | 2308 | } |
| 2316 | 2309 | |
| 2317 | /// TODO deprecated, use `addSystemIncludePath`. | |
| 2318 | pub fn addSystemIncludeDir(self: *LibExeObjStep, path: []const u8) void { | |
| 2319 | self.addSystemIncludePath(path); | |
| 2320 | } | |
| 2310 | pub const addSystemIncludeDir = @compileError("deprecated; use addSystemIncludePath"); | |
| 2311 | pub const addIncludeDir = @compileError("deprecated; use addIncludePath"); | |
| 2312 | pub const addLibPath = @compileError("deprecated, use addLibraryPath"); | |
| 2313 | pub const addFrameworkDir = @compileError("deprecated, use addFrameworkPath"); | |
| 2321 | 2314 | |
| 2322 | 2315 | pub fn addSystemIncludePath(self: *LibExeObjStep, path: []const u8) void { |
| 2323 | 2316 | self.include_dirs.append(IncludeDir{ .raw_path_system = self.builder.dupe(path) }) catch unreachable; |
| 2324 | 2317 | } |
| 2325 | 2318 | |
| 2326 | /// TODO deprecated, use `addIncludePath`. | |
| 2327 | pub fn addIncludeDir(self: *LibExeObjStep, path: []const u8) void { | |
| 2328 | self.addIncludePath(path); | |
| 2329 | } | |
| 2330 | ||
| 2331 | 2319 | pub fn addIncludePath(self: *LibExeObjStep, path: []const u8) void { |
| 2332 | 2320 | self.include_dirs.append(IncludeDir{ .raw_path = self.builder.dupe(path) }) catch unreachable; |
| 2333 | 2321 | } |
| 2334 | 2322 | |
| 2335 | /// TODO deprecated, use `addLibraryPath`. | |
| 2336 | pub fn addLibPath(self: *LibExeObjStep, path: []const u8) void { | |
| 2337 | self.addLibraryPath(path); | |
| 2338 | } | |
| 2339 | ||
| 2340 | 2323 | pub fn addLibraryPath(self: *LibExeObjStep, path: []const u8) void { |
| 2341 | 2324 | self.lib_paths.append(self.builder.dupe(path)) catch unreachable; |
| 2342 | 2325 | } |
| ... | ... | @@ -2345,11 +2328,6 @@ pub const LibExeObjStep = struct { |
| 2345 | 2328 | self.rpaths.append(self.builder.dupe(path)) catch unreachable; |
| 2346 | 2329 | } |
| 2347 | 2330 | |
| 2348 | /// TODO deprecated, use `addFrameworkPath`. | |
| 2349 | pub fn addFrameworkDir(self: *LibExeObjStep, dir_path: []const u8) void { | |
| 2350 | self.addFrameworkPath(dir_path); | |
| 2351 | } | |
| 2352 | ||
| 2353 | 2331 | pub fn addFrameworkPath(self: *LibExeObjStep, dir_path: []const u8) void { |
| 2354 | 2332 | self.framework_dirs.append(self.builder.dupe(dir_path)) catch unreachable; |
| 2355 | 2333 | } |
lib/std/builtin.zig+2-5| ... | ... | @@ -184,9 +184,7 @@ pub const SourceLocation = struct { |
| 184 | 184 | }; |
| 185 | 185 | |
| 186 | 186 | pub const TypeId = std.meta.Tag(Type); |
| 187 | ||
| 188 | /// TODO deprecated, use `Type` | |
| 189 | pub const TypeInfo = Type; | |
| 187 | pub const TypeInfo = @compileError("deprecated; use Type"); | |
| 190 | 188 | |
| 191 | 189 | /// This data structure is used by the Zig language code generation and |
| 192 | 190 | /// therefore must be kept in sync with the compiler implementation. |
| ... | ... | @@ -359,8 +357,7 @@ pub const Type = union(enum) { |
| 359 | 357 | decls: []const Declaration, |
| 360 | 358 | }; |
| 361 | 359 | |
| 362 | /// TODO deprecated use Fn.Param | |
| 363 | pub const FnArg = Fn.Param; | |
| 360 | pub const FnArg = @compileError("deprecated; use Fn.Param"); | |
| 364 | 361 | |
| 365 | 362 | /// This data structure is used by the Zig language code generation and |
| 366 | 363 | /// therefore must be kept in sync with the compiler implementation. |
lib/std/crypto/25519/edwards25519.zig-1| ... | ... | @@ -69,7 +69,6 @@ pub const Edwards25519 = struct { |
| 69 | 69 | .is_base = true, |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | pub const neutralElement = @compileError("deprecated: use identityElement instead"); | |
| 73 | 72 | pub const identityElement = Edwards25519{ .x = Fe.zero, .y = Fe.one, .z = Fe.one, .t = Fe.zero }; |
| 74 | 73 | |
| 75 | 74 | /// Reject the neutral element. |
lib/std/fmt.zig-3| ... | ... | @@ -1885,7 +1885,6 @@ test "parseUnsigned" { |
| 1885 | 1885 | } |
| 1886 | 1886 | |
| 1887 | 1887 | pub const parseFloat = @import("fmt/parse_float.zig").parseFloat; |
| 1888 | pub const parseHexFloat = @compileError("deprecated; use `parseFloat`"); | |
| 1889 | 1888 | pub const ParseFloatError = @import("fmt/parse_float.zig").ParseFloatError; |
| 1890 | 1889 | |
| 1891 | 1890 | test { |
| ... | ... | @@ -1948,8 +1947,6 @@ pub fn allocPrint(allocator: mem.Allocator, comptime fmt: []const u8, args: anyt |
| 1948 | 1947 | }; |
| 1949 | 1948 | } |
| 1950 | 1949 | |
| 1951 | pub const allocPrint0 = @compileError("deprecated; use allocPrintZ"); | |
| 1952 | ||
| 1953 | 1950 | pub fn allocPrintZ(allocator: mem.Allocator, comptime fmt: []const u8, args: anytype) AllocPrintError![:0]u8 { |
| 1954 | 1951 | const result = try allocPrint(allocator, fmt ++ "\x00", args); |
| 1955 | 1952 | return result[0 .. result.len - 1 :0]; |
lib/std/hash_map.zig-6| ... | ... | @@ -120,8 +120,6 @@ pub const StringIndexAdapter = struct { |
| 120 | 120 | } |
| 121 | 121 | }; |
| 122 | 122 | |
| 123 | pub const DefaultMaxLoadPercentage = @compileError("deprecated; use `default_max_load_percentage`"); | |
| 124 | ||
| 125 | 123 | pub const default_max_load_percentage = 80; |
| 126 | 124 | |
| 127 | 125 | /// This function issues a compile error with a helpful message if there |
| ... | ... | @@ -517,8 +515,6 @@ pub fn HashMap( |
| 517 | 515 | return self.unmanaged.getOrPutValueContext(self.allocator, key, value, self.ctx); |
| 518 | 516 | } |
| 519 | 517 | |
| 520 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 521 | ||
| 522 | 518 | /// Increases capacity, guaranteeing that insertions up until the |
| 523 | 519 | /// `expected_count` will not cause an allocation, and therefore cannot fail. |
| 524 | 520 | pub fn ensureTotalCapacity(self: *Self, expected_count: Size) Allocator.Error!void { |
| ... | ... | @@ -900,8 +896,6 @@ pub fn HashMapUnmanaged( |
| 900 | 896 | return new_cap; |
| 901 | 897 | } |
| 902 | 898 | |
| 903 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 904 | ||
| 905 | 899 | pub fn ensureTotalCapacity(self: *Self, allocator: Allocator, new_size: Size) Allocator.Error!void { |
| 906 | 900 | if (@sizeOf(Context) != 0) |
| 907 | 901 | @compileError("Cannot infer context " ++ @typeName(Context) ++ ", call ensureTotalCapacityContext instead."); |
lib/std/log.zig-12| ... | ... | @@ -169,10 +169,6 @@ pub fn defaultLog( |
| 169 | 169 | /// provided here. |
| 170 | 170 | pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 171 | 171 | return struct { |
| 172 | pub const emerg = @compileError("deprecated; use err instead of emerg"); | |
| 173 | pub const alert = @compileError("deprecated; use err instead of alert"); | |
| 174 | pub const crit = @compileError("deprecated; use err instead of crit"); | |
| 175 | ||
| 176 | 172 | /// Log an error message. This log level is intended to be used |
| 177 | 173 | /// when something has gone wrong. This might be recoverable or might |
| 178 | 174 | /// be followed by the program exiting. |
| ... | ... | @@ -194,8 +190,6 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 194 | 190 | log(.warn, scope, format, args); |
| 195 | 191 | } |
| 196 | 192 | |
| 197 | pub const notice = @compileError("deprecated; use info instead of notice"); | |
| 198 | ||
| 199 | 193 | /// Log an info message. This log level is intended to be used for |
| 200 | 194 | /// general messages about the state of the program. |
| 201 | 195 | pub fn info( |
| ... | ... | @@ -219,10 +213,6 @@ pub fn scoped(comptime scope: @Type(.EnumLiteral)) type { |
| 219 | 213 | /// The default scoped logging namespace. |
| 220 | 214 | pub const default = scoped(.default); |
| 221 | 215 | |
| 222 | pub const emerg = @compileError("deprecated; use err instead of emerg"); | |
| 223 | pub const alert = @compileError("deprecated; use err instead of alert"); | |
| 224 | pub const crit = @compileError("deprecated; use err instead of crit"); | |
| 225 | ||
| 226 | 216 | /// Log an error message using the default scope. This log level is intended to |
| 227 | 217 | /// be used when something has gone wrong. This might be recoverable or might |
| 228 | 218 | /// be followed by the program exiting. |
| ... | ... | @@ -233,8 +223,6 @@ pub const err = default.err; |
| 233 | 223 | /// the circumstances would be worth investigating. |
| 234 | 224 | pub const warn = default.warn; |
| 235 | 225 | |
| 236 | pub const notice = @compileError("deprecated; use info instead of notice"); | |
| 237 | ||
| 238 | 226 | /// Log an info message using the default scope. This log level is intended to |
| 239 | 227 | /// be used for general messages about the state of the program. |
| 240 | 228 | pub const info = default.info; |
lib/std/math.zig-7| ... | ... | @@ -170,13 +170,6 @@ pub fn approxEqRel(comptime T: type, x: T, y: T, tolerance: T) bool { |
| 170 | 170 | return @fabs(x - y) <= max(@fabs(x), @fabs(y)) * tolerance; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | pub fn approxEq(comptime T: type, x: T, y: T, tolerance: T) bool { | |
| 174 | _ = x; | |
| 175 | _ = y; | |
| 176 | _ = tolerance; | |
| 177 | @compileError("deprecated; use `approxEqAbs` or `approxEqRel`"); | |
| 178 | } | |
| 179 | ||
| 180 | 173 | test "approxEqAbs and approxEqRel" { |
| 181 | 174 | inline for ([_]type{ f16, f32, f64, f128 }) |T| { |
| 182 | 175 | const eps_value = comptime floatEps(T); |
lib/std/math/complex.zig-2| ... | ... | @@ -34,8 +34,6 @@ pub fn Complex(comptime T: type) type { |
| 34 | 34 | /// Imaginary part. |
| 35 | 35 | im: T, |
| 36 | 36 | |
| 37 | pub const new = @compileError("deprecated; use init()"); | |
| 38 | ||
| 39 | 37 | /// Create a new Complex number from the given real and imaginary parts. |
| 40 | 38 | pub fn init(re: T, im: T) Self { |
| 41 | 39 | return Self{ |
lib/std/mem.zig-10| ... | ... | @@ -702,8 +702,6 @@ test "span" { |
| 702 | 702 | try testing.expectEqual(@as(?[:0]u16, null), span(@as(?[*:0]u16, null))); |
| 703 | 703 | } |
| 704 | 704 | |
| 705 | pub const spanZ = @compileError("deprecated; use use std.mem.span() or std.mem.sliceTo()"); | |
| 706 | ||
| 707 | 705 | /// Helper for the return type of sliceTo() |
| 708 | 706 | fn SliceTo(comptime T: type, comptime end: meta.Elem(T)) type { |
| 709 | 707 | switch (@typeInfo(T)) { |
| ... | ... | @@ -957,8 +955,6 @@ test "len" { |
| 957 | 955 | } |
| 958 | 956 | } |
| 959 | 957 | |
| 960 | pub const lenZ = @compileError("deprecated; use std.mem.len() or std.mem.sliceTo().len"); | |
| 961 | ||
| 962 | 958 | pub fn indexOfSentinel(comptime Elem: type, comptime sentinel: Elem, ptr: [*:sentinel]const Elem) usize { |
| 963 | 959 | var i: usize = 0; |
| 964 | 960 | while (ptr[i] != sentinel) { |
| ... | ... | @@ -975,9 +971,6 @@ pub fn allEqual(comptime T: type, slice: []const T, scalar: T) bool { |
| 975 | 971 | return true; |
| 976 | 972 | } |
| 977 | 973 | |
| 978 | pub const dupe = @compileError("deprecated; use `Allocator.dupe`"); | |
| 979 | pub const dupeZ = @compileError("deprecated; use `Allocator.dupeZ`"); | |
| 980 | ||
| 981 | 974 | /// Remove values from the beginning of a slice. |
| 982 | 975 | pub fn trimLeft(comptime T: type, slice: []const T, values_to_strip: []const T) []const T { |
| 983 | 976 | var begin: usize = 0; |
| ... | ... | @@ -1567,9 +1560,6 @@ test "writeIntBig and writeIntLittle" { |
| 1567 | 1560 | try testing.expect(eql(u8, buf2[0..], &[_]u8{ 0xfc, 0xff })); |
| 1568 | 1561 | } |
| 1569 | 1562 | |
| 1570 | /// TODO delete this deprecated declaration after 0.10.0 is released | |
| 1571 | pub const bswapAllFields = @compileError("bswapAllFields has been renamed to byteSwapAllFields"); | |
| 1572 | ||
| 1573 | 1563 | /// Swap the byte order of all the members of the fields of a struct |
| 1574 | 1564 | /// (Changing their endianess) |
| 1575 | 1565 | pub fn byteSwapAllFields(comptime S: type, ptr: *S) void { |
lib/std/multi_array_list.zig-2| ... | ... | @@ -334,8 +334,6 @@ pub fn MultiArrayList(comptime S: type) type { |
| 334 | 334 | self.len = new_len; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 338 | ||
| 339 | 337 | /// Modify the array so that it can hold at least `new_capacity` items. |
| 340 | 338 | /// Implements super-linear growth to achieve amortized O(1) append operations. |
| 341 | 339 | /// Invalidates pointers if additional memory is needed. |
lib/std/priority_dequeue.zig-2| ... | ... | @@ -357,8 +357,6 @@ pub fn PriorityDequeue(comptime T: type, comptime Context: type, comptime compar |
| 357 | 357 | return queue; |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`"); | |
| 361 | ||
| 362 | 360 | /// Ensure that the dequeue can fit at least `new_capacity` items. |
| 363 | 361 | pub fn ensureTotalCapacity(self: *Self, new_capacity: usize) !void { |
| 364 | 362 | var better_capacity = self.capacity(); |
lib/std/priority_queue.zig-2| ... | ... | @@ -185,8 +185,6 @@ pub fn PriorityQueue(comptime T: type, comptime Context: type, comptime compareF |
| 185 | 185 | return queue; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | pub const ensureCapacity = @compileError("deprecated; use ensureUnusedCapacity or ensureTotalCapacity"); | |
| 189 | ||
| 190 | 188 | /// Ensure that the queue can fit at least `new_capacity` items. |
| 191 | 189 | pub fn ensureTotalCapacity(self: *Self, new_capacity: usize) !void { |
| 192 | 190 | var better_capacity = self.capacity(); |
src/Autodoc.zig+2-2| ... | ... | @@ -531,7 +531,7 @@ const DocData = struct { |
| 531 | 531 | Int: struct { name: []const u8 }, |
| 532 | 532 | Float: struct { name: []const u8 }, |
| 533 | 533 | Pointer: struct { |
| 534 | size: std.builtin.TypeInfo.Pointer.Size, | |
| 534 | size: std.builtin.Type.Pointer.Size, | |
| 535 | 535 | child: Expr, |
| 536 | 536 | sentinel: ?Expr = null, |
| 537 | 537 | @"align": ?Expr = null, |
| ... | ... | @@ -641,7 +641,7 @@ const DocData = struct { |
| 641 | 641 | const current_value = @field(self, case.name); |
| 642 | 642 | inline for (comptime std.meta.fields(case.field_type)) |f| { |
| 643 | 643 | try jsw.arrayElem(); |
| 644 | if (f.field_type == std.builtin.TypeInfo.Pointer.Size) { | |
| 644 | if (f.field_type == std.builtin.Type.Pointer.Size) { | |
| 645 | 645 | try jsw.emitNumber(@enumToInt(@field(current_value, f.name))); |
| 646 | 646 | } else { |
| 647 | 647 | try std.json.stringify(@field(current_value, f.name), opts, w); |