cli: map block diagnostics to their source constructs
This commit is contained in:
1 parent
1495650587
commit
1a80c42289
30 files changed
+555
-27
No files matched your search
@@ -0,0 +1,18 @@
|
||||
// expect: run
|
||||
// result: 42
|
||||
// grant: heap=mem.alloc:8
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md
|
||||
module test.source_heap_release
|
||||
|
||||
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] {
|
||||
let owner = own.new(40u64, heap) or trap;
|
||||
var result: u64 = 0;
|
||||
{
|
||||
mut view = owner;
|
||||
*view = *view + 2;
|
||||
result = *view;
|
||||
}
|
||||
own.free(move owner);
|
||||
result
|
||||
}
|
||||
Reference in new issue
Block a user