aboutsummaryrefslogtreecommitdiff
path: root/lib/std/priority_queue.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-27 03:30:39 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-27 03:37:50 -0500
commitbf3ac6615051143a9ef41180cd74e88de5dd573d (patch)
tree94571f5e6d408287928091c4dad6451d946d6434 /lib/std/priority_queue.zig
parent379d547603badb2667089c85454a2e3f5ede3342 (diff)
downloadzig-bf3ac6615051143a9ef41180cd74e88de5dd573d.tar.gz
zig-bf3ac6615051143a9ef41180cd74e88de5dd573d.zip
remove type coercion from array values to references
* Implements #3768. This is a sweeping breaking change that requires many (trivial) edits to Zig source code. Array values no longer coerced to slices; however one may use `&` to obtain a reference to an array value, which may then be coerced to a slice. * Adds `IrInstruction::dump`, for debugging purposes. It's useful to call to inspect the instruction when debugging Zig IR. * Fixes bugs with result location semantics. See the new behavior test cases, and compile error test cases. * Fixes bugs with `@typeInfo` not properly resolving const values. * Behavior tests are passing but std lib tests are not yet. There is more work to do before merging this branch.
Diffstat (limited to 'lib/std/priority_queue.zig')
-rw-r--r--lib/std/priority_queue.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/priority_queue.zig b/lib/std/priority_queue.zig
index bf54f6937f..3351ac994b 100644
--- a/lib/std/priority_queue.zig
+++ b/lib/std/priority_queue.zig
@@ -22,7 +22,7 @@ pub fn PriorityQueue(comptime T: type) type {
/// `fn lessThan(a: T, b: T) bool { return a < b; }`
pub fn init(allocator: *Allocator, compareFn: fn (a: T, b: T) bool) Self {
return Self{
- .items = [_]T{},
+ .items = &[_]T{},
.len = 0,
.allocator = allocator,
.compareFn = compareFn,